apache 日志不記錄圖片 css js 文件訪問

時間:2020/7/6 19:59:28,點擊:0

#圖片靜態類型日志不記錄
<FilesMatch "\.(ico|gif|jpg|swf|js|css|png)">
SetEnv IMAG    
</FilesMatch>
#禁止一些文件訪問執行
<Files ~ "convert.php|shell.php|database.php|.sql$">
Order allow,deny
Deny from all
</Files>
#禁止圖片等非腳本目錄內的腳本文件訪問
<DirectoryMatch "images|static|themes|sqldata|afficheimg">
<Files ~ "\.(php|txt)$">
Deny from all
</Files>
</DirectoryMatch>

<VirtualHost *:80>
DocumentRoot /alidata/www/htdocs
ServerName www.host.com
ServerAlias host.com
<Directory "/alidata/www/htdocs">
Options FollowSymLinks IncludesNOEXEC -Indexes
DirectoryIndex index.html index.php
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>

CustomLog "logs/host_com.log" combined env=!IMAG
</VirtualHost>

打印 | 關閉

梅西c罗总进球数