mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 23:00:28 -04:00
Anonymize web logs after rotating and disable explicit download logging in favor of grepping the regular web logs
This commit is contained in:
parent
1ea3b2f28b
commit
1e698f2389
4 changed files with 76 additions and 16 deletions
|
@ -60,8 +60,9 @@ Define domain standardebooks.org
|
|||
DocumentRoot /standardebooks.org/web/www
|
||||
ErrorDocument 404 /404
|
||||
ErrorLog /var/log/local/www-error.log
|
||||
DirectorySlash Off
|
||||
RewriteEngine on
|
||||
CustomLog "|/usr/bin/rotatelogs -f -p /standardebooks.org/scripts/rotate-www-logs /var/log/local/apache/www-access.log 86400" combined
|
||||
CustomLog "|/usr/bin/rotatelogs -f -p /standardebooks.org/web/scripts/rotate-www-logs /var/log/local/apache/www-access.log 86400" combined
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/${domain}/fullchain.pem
|
||||
|
@ -69,13 +70,6 @@ Define domain standardebooks.org
|
|||
Header always set Strict-Transport-Security "max-age=15768000"
|
||||
Header set Content-Security-Policy "default-src 'self';"
|
||||
|
||||
# Log downloads
|
||||
SetEnvIf Request_URI "\.epub$" logdownload
|
||||
SetEnvIf Request_URI "\.kepub.epub$" logdownload
|
||||
SetEnvIf Request_URI "\.azw3$" logdownload
|
||||
CustomLog /var/log/local/downloads.log "%h [%{%Y-%m-%d %H:%M:%S %Z}t] \"%r\" %>s %b" env=logdownload
|
||||
DirectorySlash Off
|
||||
|
||||
<Directory /standardebooks.org/web/www/>
|
||||
# Disable .htaccess files
|
||||
AllowOverride none
|
||||
|
|
|
@ -60,6 +60,7 @@ Define domain standardebooks.test
|
|||
DocumentRoot /standardebooks.org/web/www
|
||||
ErrorDocument 404 /404
|
||||
ErrorLog /var/log/local/www-error.log
|
||||
DirectorySlash Off
|
||||
RewriteEngine on
|
||||
|
||||
SSLEngine on
|
||||
|
@ -68,13 +69,6 @@ Define domain standardebooks.test
|
|||
Header always set Strict-Transport-Security "max-age=15768000"
|
||||
Header set Content-Security-Policy "default-src 'self';"
|
||||
|
||||
# Log downloads
|
||||
SetEnvIf Request_URI "\.epub$" logdownload
|
||||
SetEnvIf Request_URI "\.kepub.epub$" logdownload
|
||||
SetEnvIf Request_URI "\.azw3$" logdownload
|
||||
CustomLog /var/log/local/downloads.log "%h [%{%Y-%m-%d %H:%M:%S %Z}t] \"%r\" %>s %b" env=logdownload
|
||||
DirectorySlash Off
|
||||
|
||||
<Directory /standardebooks.org/web/www/>
|
||||
# Disable .htaccess files
|
||||
AllowOverride none
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue