WAMP环境虚拟主机指定默认文档

老虎说测试 系统运维字数 536阅读1分47秒阅读模式
摘要WAMP环境虚拟主机指定默认文档,在虚拟机下需要重新设置默认文档。

WAMP环境虚拟主机指定默认文档,在虚拟机下需要重新设置默认文档。

 文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html

然后我们在虚拟机的配置文件[httpd.conf]中增加如下内容即可:文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<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>
  1. <IfModule dir_module>
  2.  
  3. DirectoryIndex index.php index.php3 index.html index.htm
  4.  
  5. </IfModule>

 文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html

这里写一个完整的:文章源自陈学虎-https://chenxuehu.com/article/2015/02/4275.html

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<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>
  1. <VirtualHost www.test.com:80>
  2.  
  3. DocumentRoot "D:/wamp/www"
  4.  
  5. ServerName www.test.com
  6.  
  7. DirectoryIndex index.php
  8.  
  9. <Directory />
  10.  
  11. Options Indexes FollowSymLinks
  12.  
  13. AllowOverride None
  14.  
  15. Order allow,deny
  16.  
  17. Allow from all
  18.  
  19. </Directory>
  20.  
  21. <IfModule dir_module>
  22.  
  23. DirectoryIndex index.php index.php3 index.html index.htm
  24.  
  25. </IfModule>
  26.  
  27. </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

 最后更新:2018-7-4
  • 版权声明:本文为原创文章,转载请附上原文出处链接及本声明。
  • 转载请注明:WAMP环境虚拟主机指定默认文档 | https://chenxuehu.com/article/2015/02/4275.html
评论  3  访客  1  作者  2