允许局域网访问
只需要配置 \wamp\bin\apache\apache{version}\conf\extra\httpd-vhosts.conf
Or
左键点击wamp服务图标-> Apache -> httpd-vhost.conf
打开配置文件后会显示大概这样的内容
#
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
修改其中的 Require local
改为 Require all granted
重启WAMP所有服务
修改根目录方法
- 左键点击wamp服务图标-> Apache -> httpd-vhost.conf
-
找到其中的
DocumentRoot "${INSTALL_DIR}/www/" <Directory "${INSTALL_DIR}/www/">
修改"${INSTALL_DIR}/www/"为想更改的路径"G:/2019/"
- 左键点击wamp服务图标-> Apache -> httpd.conf
-
找到其中的
DocumentRoot "${INSTALL_DIR}/www/" <Directory "${INSTALL_DIR}/www/">
修改"${INSTALL_DIR}/www/"为想更改的路径"G:/2019/"
重启WAMP所有服务