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

WBOY
Release: 2016-07-13 10:04:30
Original
984 people have browsed it

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...
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 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!