welcome.conf設(shè)置說(shuō)明及LocationMatch用法
廣告:
#
# 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.
#
# NOTE: if this file is removed, it will be restored on upgrades.
#options中Indexes表示當(dāng)網(wǎng)頁(yè)不存在的時(shí)候允許索引顯示目錄中的文件
#AllowOverride None表示不允許這個(gè)目錄下的訪問(wèn)控制文件來(lái)改變這里的配置,這也意味著不用查看這個(gè)目錄下的訪問(wèn)控制文件,修改為:AllowOverride All 表示允許.htaccess。
#Require all granted 允許所有訪問(wèn)請(qǐng)求
#Order對(duì)頁(yè)面的訪問(wèn)控制順序后面的一項(xiàng)是默認(rèn)#選項(xiàng),如allow,deny則默認(rèn)是deny,Allowfromall表示允許所有的用戶,通過(guò)和上一項(xiàng)結(jié)合可以控制對(duì)網(wǎng)站的訪問(wèn)控制
<LocationMatch "^/+$">
Options -Indexes
Require all granted
</LocationMatch>
#ErrorDocument 403 /.noindex.html
<Directory /usr/share/httpd/noindex>
AllowOverride None
Require all granted
</Directory>
Alias /.noindex.html /usr/share/httpd/noindex/index.html
Alias /noindex/css/bootstrap.min.css /usr/share/httpd/noindex/css/bootstrap.min.css
Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png
廣告: