前言
默認情況下,wampserver是隻能本機訪問的,也就是在localhost(127.0.0.1)上訪問,如果需要配置其他主機訪問,就需要進行相關配置
修改httpd.conf
一般是在wamp安裝目錄的 bin\apache\apache2.4.23\conf\httpd.conf
我們也可以直接在鼠標右擊wampserver的綠色標誌,找到apache下的httpd.conf
0x01
<Directory />
AllowOverride none
Require all denied
</Directory>
改爲
<Directory />
AllowOverride none
#Require all denied
Require all granted
</Directory>
0x02
搜索Require local,然後再後面加一句Require all granted
onlineoffline tag - don't remove
Require local
Require all granted
修改httpd-vhosts.conf
同樣再Require local 後面加一句Require all granted
總結
然後就配置完了,重啓下服務就行了