Home>Article>Operation and Maintenance> phpstudy cannot open localhost

phpstudy cannot open localhost

angryTom
angryTom Original
2019-10-21 11:11:23 6414browse

phpstudy cannot open localhost

##phpstudy cannot open localhost

1. First open the

httpd.conffile, Open the comment "Include conf/extra/httpd-vhosts.conf" in httpd-vhosts.conf, and load this file first when starting the service.

2. In the httpd-vhosts.conf file Configure the virtual host of localhost in:

 DocumentRoot "F:/PHP/environment/phpstudy/WWW" ServerName localhost 

3. Add the domain name in the host file:

127.0.0.1 localhost

4. Change "

#ServerName localhost:80in httpd.conf "Or just comment out "ServerName localhost", localhost can be accessed normally!

Recommended tutorial:

phpstudy usage tutorial

The above is the detailed content of phpstudy cannot open localhost. For more information, please follow other related articles on the PHP Chinese website!

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