welcome.conf設置說明及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表示當網(wǎng)頁不存在的時候允許索引顯示目錄中的文件
#AllowOverride None表示不允許這個目錄下的訪問控制文件來改變這里的配置,這也意味著不用查看這個目錄下的訪問控制文件,修改為:AllowOverride All 表示允許.htaccess。
#Require all granted 允許所有訪問請求
#Order對頁面的訪問控制順序后面的一項是默認#選項,如allow,deny則默認是deny,Allowfromall表示允許所有的用戶,通過和上一項結合可以控制對網(wǎng)站的訪問控制
<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
廣告: