1、打开Apache/conf/httpd.conf
加上“#”
2、打开Apache/conf/vhosts.conf
将里面的内容改为:
<VirtualHost _default_:80>
ServerName 127.0.0.1
DocumentRoot "C:\phpStudy\PHPTutorial\WWW" #这里填写你的WWW文件夹所在目录,以下类似
<Directory "C:\phpStudy\PHPTutorial\WWW">
Options -Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost _default_:80>
ServerName localhost
DocumentRoot "C:\phpStudy\PHPTutorial\WWW"
<Directory "C:\phpStudy\PHPTutorial\WWW">
Options -Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>