第一步 :编辑 httpd-vhosts.conf 文件
打开 ** \wamp-server3.2\bin\apache\apache2.4.37\conf\extra\httpd-vhosts.conf 修改 :
如果需要仅本地访问 :
ServerName jxc.net ServerAlias jxc.net DocumentRoot "${INSTALL_DIR}/www/vioomajxc/public/" Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local
如果需要外网发访问 ,改为如下 :
ServerName jxc.net ServerAlias jxc.net DocumentRoot "${INSTALL_DIR}/www/vioomajxc/public/" Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require all granted
第二步 :编辑 hosts 文件
hosts可用将一些常用的网址域名与其对应的IP地址建立一个关联数据库,很多用户不知道windows10电脑的hosts文件在哪?
我们首先打开C盘,以此打开C:\Windows\System32\drivers\etc
即可在etc文件夹内找到hosts文件,以下就是windows10的hosts文件位置介绍。
如何设置允许程序通过Windows7防火墙
https://jingyan.baidu.com/article/0eb457e5d96f8203f1a9052a.html