1.安装apache
yum install httpd
卸载
yum remove httpd mod_wsgi
2.启动,关闭 重启等命令
systemctl start httpd.service(启动)
systemctl stop httpd.service (关闭)
systemctl restart httpd.service(重启)
systemctl enable httpd.service(开机即启动)
systemctl status httpd.service(查看运行状态)
3.修改apache根目录
1、vim /etc/httpd/conf/httpd.conf
找到 DocumentRoot “/var/www/html” 这一段 #apache的根目录
把/var/www/html 这个目录改为/data/website
再找到 #定义apache /var/www/html这个区域
把 /var/www/html改成/data/website
这样我们就把apahce的默认路径改掉了
service httpd restart #重启Apache服务器
4.在APACHE服务器上的访问方式上去除index.php
AllowOverride 后面的None改为All (全部AllowOverride改为all)
就可以使用laravel .htaccess(在根目录public下)