WAMP环境虚拟主机指定默认文档,在虚拟机下需要重新设置默认文档。
文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html
然后我们在虚拟机的配置文件[httpd.conf]中增加如下内容即可:文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html
<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>
<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>
- <IfModule dir_module>
- DirectoryIndex index.php index.php3 index.html index.htm
- </IfModule>
文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html
这里写一个完整的:文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html
<VirtualHost www.test.com:80>
DocumentRoot "D:/wamp/www"
ServerName www.test.com
DirectoryIndex index.php
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>
</VirtualHost>
<VirtualHost www.test.com:80>
DocumentRoot "D:/wamp/www"
ServerName www.test.com
DirectoryIndex index.php
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>
</VirtualHost>
- <VirtualHost www.test.com:80>
- DocumentRoot "D:/wamp/www"
- ServerName www.test.com
- DirectoryIndex index.php
- <Directory />
- Options Indexes FollowSymLinks
- AllowOverride None
- Order allow,deny
- Allow from all
- </Directory>
- <IfModule dir_module>
- DirectoryIndex index.php index.php3 index.html index.htm
- </IfModule>
- </VirtualHost>
文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html
然后重启WAMP环境即可。文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html
文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html
文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html 文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html
评论