打開安裝wampserver的目錄
我安裝的目錄是D盤
D:\wamp64\bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf
文件下把里邊的代碼修改成下邊的這樣
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp64/www/API/public/
<Directory "D:/wamp64/www/API/public/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
#
不需要別的東西就這樣就好