修改vhosts.conf文件
<VirtualHost _default_:80>
DocumentRoot "D:\WWW"
<Directory "D:\WWW">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\WWW\test"
ServerName www.test.com
ServerAlias test.com
<Directory "D:\WWW\test">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
apache不解析php
1.找到:
AddType application/x-gzip .gz .tgz
在其下面添加:
AddType application/x-httpd-php .php //添加支持对php脚本解析
2. 找到:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
把中间那一行改为:
DirectoryIndex index.html index.htm index.php //增加对php的索引