Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-13 09:12:39
Original
801 people have browsed it

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的地址或调整顺序即可。

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!