apache配置多个虚拟主机 localhost访问不了解决方案,apachelocalhost
在httpd-vhosts.conf,重定向localhost
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:/PHPAPACHERUN"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
而如果出现访问127.0.0.1的结果不是自己想要的,可能是因为httpd-vhosts.conf,存在了多个,地址127.0.0.1按顺序解析,解析到第一个,修改DocumentRoot的地址或调整顺序即可。
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn