In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the apache configuration virtual domain name invalid solution, the article introduces in great detail, has a certain reference value, interested friends must read it!
Background of the article:
Apache is reinstalled on the computer, but cannot be accessed after configuring the virtual domain name. Localhost always displays the it works status, and entering any configured domain name shows the it works status, but the file directory can be seen through 127.0.0.1.
Analysis:
The problem is that on the httpd_conf file, you only need to comment out ServerName localhost:80.
Solution:
Start by configuring the virtual host:
Start with the host file in the system disk:
First, add a domain name: 127.0.0.1 www.m.com. Open the httpd.conf file and open httpd-vhosts.conf:
# Virtual hostsInclude conf/extra/httpd-vhosts.conf
Then open the httpd-vhosts.conf file and configure a virtual host:
DocumentRoot "D:/wamp/apache/htdocs" ServerName www.m.com
Restart Apache. In this case, the domain name www.m.com of the virtual host cannot be accessed, or the status of it works
Resolve:
First, several other virtual domain names are configured, and none of them can access the file code.
Access through localhost is also out of it works status.
Finally, it is found that you only need to put the following in the httpd-vhosts.conf file:
# ServerName localhost:80
Comment out and restart apache!
The above is all the contents of the article "the solution to the invalid virtual domain name in apache configuration". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.