配置虚拟主机

配置虚拟主机
1.配置httpd.conf
D:\wamp\bin\apache\apache2.4.17\conf
1).开启重写模块
LoadModule rewrite_module modules/mod_rewrite.so
2). 访问权限 允许所有访问
AllowOverride all
Require all granted
3).开启vhost配置文件(开启之后 默认的localhost就无法访问)
Include conf/extra/httpd-vhosts.conf
2. 配置vhost文件
D:\wamp\bin\apache\apache2.4.17\conf\extra
<VirtualHost *:80>
DocumentRoot "d:/web"
ServerName ss.com
</VirtualHost>
3.配置系统HOST
C:\Windows\System32\drivers\etc

PS.!(一定要重启服务)

posted @ 2018-07-17 17:09  付俊捷  阅读(97)  评论(0编辑  收藏  举报