时间:2016-02-26 18:03 来源: 我爱IT技术网 作者:佚名
欢迎您访问我爱IT技术网,今天小编为你分享的电脑教程是服务器系列之:【Apache 虚拟目录和默认首页的设置】,下面是详细的分享!
Apache 虚拟目录和默认首页的设置
虚拟目录1.找到"conf/httpd.conf" 文件
2.在节点:
Alias /aidd2008 "D:/php/web/aidd2008"
其中 aidd2008 是你想要访问的虚拟目录; D:/php/web/aidd2008 为物理路径,以[/]代替[\]"
我们就在
代码如下:
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
(*)aidd2008 为虚拟目录名称,一般不用在名称后加"/",若加入,每次都要在虚拟目录后输入"/"才能访问网站
代码如下:
Alias /gt "D:/PHP/gt"
php_admin_flag safe_mode off
AllowOverride AuthConfig
Order allow,deny
Allow from all
3.重启Apache
设置默认页面
方法1 设置全局的:
代码如下:
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml default.php
方法2 针对某一目录可以这么设置:
代码如下:
Alias /aidd2008 "D:/php/web/aidd2008"
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.php
以上就是关于Apache 虚拟目录和默认首页的设置的服务器维护教程分享,更多电脑教程请移步到>>电脑教程频道。
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
