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

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

问题描述

如何更改Apache的默认目录和索引文件(通过XAMPP安装),而不是查找 htdocs index ,它分别寻找 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天全站免登陆