使用wampserver執行laravel專案
====================
1.設定 httpd.conf
C:\wamp64\bin\apache\apache2.4.23\conf\httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
--------------
2.設定 httpd-vhost.conf
C:\wamp64\bin\apache\apache2.4.23\conf\extra\httpd-vhost.conf
*原本:
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot d:/php
<Directory "d:/php/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#
*修改如下:
# Virtual Hosts
#
<VirtualHost *:80>
ServerAdmin webmaster@laravelpro.dev
DocumentRoot "D:\php\shop2\public"
ServerName laravelpro.dev
ServerAlias www.laravelpro.dev
ErrorLog "logs/laravelpro.dev-error.log"
CustomLog "logs/laravelpro.dev-access.log" common
</VirtualHost>
#
--------------
3.設定 hosts
C:\Windows\System32\drivers\etc\hosts
127.0.0.1 laravelpro.dev
--------------
4.重啟 wampserver
--------------
5.測試
http://localhost
http://laravelpro.dev
====================
*參考資料
Run Laravel project without artisan in WAMP server
https://phpcodes.in/run-laravel-project-without-artisan-in-wamp-server/
Run Laravel without artisan
https://www.youtube.com/watch?v=m_a7spwPRzo
沒有留言:
張貼留言