Home > Article > Operation and Maintenance > phpstudy domain name cannot be accessed
1. First, make sure that the window has a hosts file, and the hosts file does not have any suffix
2. Hosts contains (127.0.0.1 your virtual domain name ) Statement
Example: 127.0.0.1 www.mmp.com
3. There must be
#Include conf/extra/httpd-vhosts.conf
before the following statement in httpd.conf in Apache in phpstudy. In addition, please make sure httpd.conf is normal and has not been modified.
4. Make sure that your virtual domain name has been configured in phpStudy\Apache\conf\vhosts.conf. You can refer to the following configuration.
The following example is The configured website is www.mmp.com. After DocumentRoot, fill in the path of the file you want to access with your virtual domain name
<VirtualHost *:80> DocumentRoot "D:/phpStudy/WWW/xdswxhd" ServerName www.mmp.com ServerAlias phpStudy.net <Directory "D:/phpStudy/WWW/xdswxhd"> Options +Indexes +FollowSymLinks +ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>
Recommended tutorial: phpstudy tutorial
The above is the detailed content of phpstudy domain name cannot be accessed. For more information, please follow other related articles on the PHP Chinese website!