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下)