虚拟域名(只要5步简单配置本地虚拟主机的域名)

1.打开hosts文件,添加一个新的域名C:\Windows\System32\drivers\etc添加例如:127.0.0.1www.guoqing.com ::1www.guoqing.com2.修改apache的配置文件C:\wamp64\bin\apache\apache2.4.17\conf\httpd.conf# Virtual hostsInclude conf/extra/httpd-vhosts.conf去掉前边的#3.C:\wamp64\bin\apache\apache2.4.17\conf\extra\httpd-vhosts.conf<VirtualHost *:80>ServerName www.guoqing.comDocumentRoot c:/wamp64/www/guoqing<Directory “c:/wamp64/www/guoqing/”>Options Indexes FollowSymLinks MultiViewsAllowOverride AllRequire local</Directory></VirtualHost>4.重启服务器5.在www目录下新建一个目录


本文出自快速备案,转载时请注明出处及相应链接。

本文永久链接: https://www.xiaosb.com/beian/37415/