設定apache將laravel專案run起來
將laravel專案在apache上可以run
設定 Apache 建立 Laravel VirtualHost
vi /etc/httpd/conf/httpd.confListen *:80新增一組laravel的VirtualHost資料
vi /etc/httpd/conf.d/(專案名+port).conf
// ex: iscar_box80.conf<VirtualHost *:80>
DocumentRoot "/var/www/html/專案名/public"
ServerName "此輸入你想要的url名稱" // ex:stage-tw-box.iscarmg.com
ErrorLog "/var/log/httpd/專案名_error.log"
CustomLog "/var/log/httpd/專案名_access.log" combined
DirectoryIndex index.php
<Directory "/var/www/html/專案名/public">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>修改資料夾權限
修改.htaccess檔
重啟apache
遇到的問題
如果要一起run很多個專案的話請看下面的連結
Last updated