Home  >  Article  >  Backend Development  >  Apache configures multiple virtual hosts. Localhost cannot access the solution. apachelocalhost_PHP tutorial

Apache configures multiple virtual hosts. Localhost cannot access the solution. apachelocalhost_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:04:30995browse

Apache configures multiple virtual hosts. Localhost cannot access the solution. apachelocalhost

In httpd-vhosts.conf, redirect 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

If the result of accessing 127.0.0.1 is not what you want, it may be because there are multiple in httpd-vhosts.conf, and the address 127.0.0.1 is parsed in order, and it is parsed to the first One, just modify the address of DocumentRoot or adjust the order.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/966283.htmlTechArticleApache configures multiple virtual hosts and localhost cannot access the solution. apachelocalhost is in httpd-vhosts.conf, redirect localhost VirtualHost *:80 ServerAdmin webmaster@dummy-host2.exam...
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