设置虚拟域名
1.修改hosts文件,目录:c:\windows\system32\drivers\etc,添加,例
localhost doma.com
2.修改httpd.conf文件
allowoverride none require all denied
为 #allowoverride none #require all denied allowoverride all order deny,allow allow from all
3.修改https-vhosts.conf文件,添加,例 serveradmin doma.com documentroot c:/wamp/www/doma servername doma.com serveralias www.dummy-host.example.com errorlog logs/dummy-host.example.com-error.log customlog logs/dummy-host.example.com-access.log common
重启apache服务,访问域名doma.com,成功但是,出现了问题,访问localhost,或者其他目录报错
403 forbidden you don't have permission to access / on this server
404 forbidden the requested url was not found on this server
无法决绝该错误,删除原有修改,重启服务器,上述错误仍然存在,无法理解需要血钙https-vhosts.cong文件,将其中的
...
全部注释,修改httpd.cong文件,
#allowoverride none #require all denied options indexes followsymlinks includes execcgi allowoverride all order deny,allow allow from all
问题解决,虚拟域名设置失败,有待思考解决
以上就介绍了 关于apache虚拟域名的设置,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。