PHP头条
热点:

apache配置多个虚拟主机 localhost访问不了解决方案,apachelocalhost


在httpd-vhosts.conf,重定向localhost

<VirtualHost *:80>
    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
</VirtualHost>

 

而如果出现访问127.0.0.1的结果不是自己想要的,可能是因为httpd-vhosts.conf,存在了多个<VirtualHost *:80>,地址127.0.0.1按顺序解析,解析到第一个,修改DocumentRoot的地址或调整顺序即可。

www.phpzy.comtrue/php/33056.htmlTechArticleapache配置多个虚拟主机 localhost访问不了解决方案,apachelocalhost 在httpd-vhosts.conf,重定向localhost VirtualHost *:80 ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "D:/PHPAPACHERUN" ServerName localhost...

相关文章

    暂无相关文章

PHP之友评论

今天推荐