点赞:841

今天终于搞定了多域名绑定虚拟主机的方法

2021-04-24 23:46:21

分类:PHP标签:网站域名解析浏览:4570


分两步实现:
第一步:到apache安装目录下的httpd.conf并打开,在最后加上:

<VirtualHost *:8080>
DocumentRoot "C:websitevisit_info"
ServerName threefond.com
<Directory "C:websitevisit_info">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "C:website"
ServerName www.threefond.com
<Directory "C:website">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
第二步:找到C:/Windows/System32/drivers/etc下的hosts文件并打开,在最后加上:
127.0.0.1       www.threefond.com
127.0.0.1       threefond.com



评论留言:
验证码:
换一个?