虚拟主机的配置??我在本地的电脑上配置了基于域名的两个虚拟主机,怎么用ip地址去访问这两个虚拟主机啊
我在浏览器中分别输入www.aaa.com和www.bbb.com是可以访问到相应的虚拟主机的。但是输入127.0.0.1去提示:forbidden,youdon'tha...
我在浏览器中分别输入www.aaa.com和www.bbb.com是可以访问到相应的虚拟主机的。
但是输入127.0.0.1去提示:forbidden,you don't have premission (没权限),或者输入localhost 也不行??
hosts文件:
127.0.0.1 www.aaa.com
127.0.0.1 www.bbb.com
http-vhosts.conf文件:
<VirtualHost *:80>
DocumentRoot "D:/php_learn/apache/htdocs/drupal"
ServerName www.aaa.com
ServerAlias aaa.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/php_learn/apache/htdocs/drupal"
ServerName www.bbb.com
ServerAlias bbb.com
</VirtualHost> 展开
但是输入127.0.0.1去提示:forbidden,you don't have premission (没权限),或者输入localhost 也不行??
hosts文件:
127.0.0.1 www.aaa.com
127.0.0.1 www.bbb.com
http-vhosts.conf文件:
<VirtualHost *:80>
DocumentRoot "D:/php_learn/apache/htdocs/drupal"
ServerName www.aaa.com
ServerAlias aaa.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/php_learn/apache/htdocs/drupal"
ServerName www.bbb.com
ServerAlias bbb.com
</VirtualHost> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询