如何更改为Apache默认的目录和索引文件(通过XAMPP安装) [英] How do I change default directory and index file for Apache (installed via XAMPP)

查看:418
本文介绍了如何更改为Apache默认的目录和索引文件(通过XAMPP安装)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何修改我的Apache(通过XAMPP安装)默认的目录和索引文件,因此而不是查找的htdocs 首页,它看起来 mypath中 MYFILE ,分别为?

How do I change default Directory and index File for Apache (installed via XAMPP) so instead of looking for htdocs and index, it looks for myPath and myFile, respectively?

推荐答案

在粘贴的研究环节都有回答你的问题的第一部分,改变你想成为的路径,但你问题的第二部分,使之成为服务MYFILE作为索引是一个额外的步骤。参见:

The research link you pasted has the first part of the answer to your question, changing the path you want serve but the second part of your question, making it serve "myFile" as the Index is an additional step. See:

http://httpd.apache.org/docs/2.0/ MOD / mod_dir.html#DirectoryIndex的

所以,你会在主httpd.conf文件中添加此行的相关标签中,甚至松动(请参阅上面的链接,有效地使用该指令的背景下部分):

So you would add this line inside the relevant tags or even loose in the main httpd.conf file (see the Context section of the above link for valid places to use this directive):

DirectoryIndex myFile.ext

希望这有助于。

这篇关于如何更改为Apache默认的目录和索引文件(通过XAMPP安装)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆