Fedora每日一篇:Apache的欢迎页面

Fedora每日一篇
Apache的欢迎页面?

在Fedora上安装Apache Web服务器后在没有添加任何内容时,访问该Web服务器会看到一个欢迎页面或者叫做Fedora Test的页面。这个页面是在哪里配置和指定的呢?又放在哪里呢?

关于这个页面其实没有在Apache的主配置文件/etc/httpd/conf/httpd.conf 中配置,而是位于 /etc/httpd/conf.d/welcome.conf的文件中指定的, 该文件中有如下配置,

#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL. To disable the Welcome page, comment
# out all the lines below.
#

Options -Indexes
ErrorDocument 403 /error/noindex.html

LocationMatch 指令确保只匹配/或多个/的URL,这样的URL只是对 DocumentRoot (http://ServerName/)请求。对于这样的请求,Indexes选项无效,不列出目录的列表,如果有index页面存在 例如 index.htmlindex.htm,该文件就会 被显示,如果没有,HTTP 403 错误会出现("Forbidden"). ErrorDocument 指令正好指定错误发生是的页面: /var/www/error/noindex.html. 如果你创建一个index页面,403错误不再发生,欢迎页面就不显示了!

/etc/httpd/conf.d/welcome.conf 属于httpd (Apache) 软件包,其他位于 /etc/httpd/conf.d 的文件属于各个Web程序如webalyzer, BackupPC, gallery2, squirrelmail, 移除相关软件包会移除相应的文件!

Comments

Popular posts from this blog

Freeware Software Top 300 from winAddons.Com!

What is DevOPS?

RPM Build Tips!