From ba4e3d3b24bacc22a5e86e7b33df40775d77d7d4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 11 Oct 2020 21:08:58 +0200 Subject: drop apache2 snippet local-log-origin, and streamline log options for sample vhosts --- apache2/conf.d/local-log-origin.conf | 1 - apache2/sites-available/chat.secure-example.com.conf | 7 ++----- apache2/sites-available/django.secure-example.com.conf | 5 +---- apache2/sites-available/issues.secure-example.com.conf | 5 +---- apache2/sites-available/lists.secure-example.com.conf | 7 ++----- apache2/sites-available/mail.secure-example.com.conf | 7 ++----- apache2/sites-available/php.example.com.conf | 5 +---- apache2/sites-available/users.secure-example.com.conf | 7 ++----- apache2/sites-available/www.secure-example.com.conf | 7 ++----- moin/apache2/sites-available/wiki.secure-example.com.conf | 7 ++----- 10 files changed, 15 insertions(+), 43 deletions(-) delete mode 100644 apache2/conf.d/local-log-origin.conf diff --git a/apache2/conf.d/local-log-origin.conf b/apache2/conf.d/local-log-origin.conf deleted file mode 100644 index 80b50a8..0000000 --- a/apache2/conf.d/local-log-origin.conf +++ /dev/null @@ -1 +0,0 @@ -LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Host}i\"" origin diff --git a/apache2/sites-available/chat.secure-example.com.conf b/apache2/sites-available/chat.secure-example.com.conf index 1b27bbf..7c1c018 100644 --- a/apache2/sites-available/chat.secure-example.com.conf +++ b/apache2/sites-available/chat.secure-example.com.conf @@ -31,13 +31,12 @@ ServerName *.chat:443 Include conf.d/local-ssl.conf - Include conf.d/local-log-origin.conf RewriteEngine On RewriteRule / https://chat.example.com/[R] # RewriteRule /(.*) https://chat.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log combined ServerName chat.example.com @@ -45,11 +44,9 @@ ServerAlias chat ServerAlias *.chat - Include conf.d/local-log-origin.conf - RewriteEngine On RewriteRule / https://chat.example.com/ [R] # RewriteRule /(.*) https://chat.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined diff --git a/apache2/sites-available/django.secure-example.com.conf b/apache2/sites-available/django.secure-example.com.conf index 5424420..e9200d9 100644 --- a/apache2/sites-available/django.secure-example.com.conf +++ b/apache2/sites-available/django.secure-example.com.conf @@ -18,10 +18,7 @@ ServerName django.example.com ServerAlias *.django.example.com - Include conf.d/local-log-origin.conf - RedirectMatch permanent .* https://django.example.com/ - ErrorLog ${APACHE_LOG_DIR}/django.example.com-error.log - CustomLog ${APACHE_LOG_DIR}/django.example.com-access.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined diff --git a/apache2/sites-available/issues.secure-example.com.conf b/apache2/sites-available/issues.secure-example.com.conf index 1ba61f0..2434e0c 100644 --- a/apache2/sites-available/issues.secure-example.com.conf +++ b/apache2/sites-available/issues.secure-example.com.conf @@ -17,10 +17,7 @@ ServerName issues.example.com ServerAlias *.issues.example.com - Include conf.d/local-log-origin.conf - RedirectMatch permanent .* https://issues.example.com/ - ErrorLog ${APACHE_LOG_DIR}/issues.example.com-error.log - CustomLog ${APACHE_LOG_DIR}/issues.example.com-access.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined diff --git a/apache2/sites-available/lists.secure-example.com.conf b/apache2/sites-available/lists.secure-example.com.conf index 1dc7bc9..8097b55 100644 --- a/apache2/sites-available/lists.secure-example.com.conf +++ b/apache2/sites-available/lists.secure-example.com.conf @@ -17,23 +17,20 @@ ServerName *.lists.example.com:443 Include conf.d/local-ssl.conf - Include conf.d/local-log-origin.conf RewriteEngine On RewriteRule / https://lists.example.com/ [R] # RewriteRule /(.*) https://lists.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log combined ServerName lists.example.com ServerAlias *.lists.example.com - Include conf.d/local-log-origin.conf - RewriteEngine On RewriteRule / https://lists.example.com/ [R] # RewriteRule /(.*) https://lists.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined diff --git a/apache2/sites-available/mail.secure-example.com.conf b/apache2/sites-available/mail.secure-example.com.conf index 3ba1a3a..dd25302 100644 --- a/apache2/sites-available/mail.secure-example.com.conf +++ b/apache2/sites-available/mail.secure-example.com.conf @@ -17,13 +17,12 @@ ServerName *.mail:443 Include conf.d/local-ssl.conf - Include conf.d/local-log-origin.conf RewriteEngine On RewriteRule / https://mail.example.com/ [R] # RewriteRule /(.*) https://mail.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined ServerName mail.example.com @@ -31,11 +30,9 @@ ServerAlias mail ServerAlias *.mail - Include /etc/apache2/conf.d/local-log-origin.conf - RewriteEngine On RewriteRule / https://mail.example.com/ [R] # RewriteRule /(.*) https://mail.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined diff --git a/apache2/sites-available/php.example.com.conf b/apache2/sites-available/php.example.com.conf index 259d5f1..6998129 100644 --- a/apache2/sites-available/php.example.com.conf +++ b/apache2/sites-available/php.example.com.conf @@ -17,10 +17,7 @@ ServerName www.php.example.com ServerAlias *.php.example.com - Include conf.d/local-log-origin.conf - RedirectMatch permanent .* http://php.example.com/ - ErrorLog ${APACHE_LOG_DIR}/django.example.com-error.log - CustomLog ${APACHE_LOG_DIR}/django.example.com-access.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined diff --git a/apache2/sites-available/users.secure-example.com.conf b/apache2/sites-available/users.secure-example.com.conf index 939ad4c..d251928 100644 --- a/apache2/sites-available/users.secure-example.com.conf +++ b/apache2/sites-available/users.secure-example.com.conf @@ -52,13 +52,12 @@ ServerName *.users:443 Include conf.d/local-ssl.conf - Include conf.d/local-log-origin.conf RewriteEngine On RewriteRule / https://users.example.com/[R] # RewriteRule /(.*) https://users.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined # ServerName www.users.example.com @@ -67,13 +66,11 @@ ServerAlias users ServerAlias *.users - Include conf.d/local-log-origin.conf - RewriteEngine On # RewriteRule / http://users.example.com/ [R] # RewriteRule /(.*) http://users.example.com/$1 [R] RewriteRule / https://users.example.com/ [R] # RewriteRule /(.*) https://users.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined diff --git a/apache2/sites-available/www.secure-example.com.conf b/apache2/sites-available/www.secure-example.com.conf index 8aebebf..7ddd913 100644 --- a/apache2/sites-available/www.secure-example.com.conf +++ b/apache2/sites-available/www.secure-example.com.conf @@ -11,13 +11,11 @@ ServerName example.com ServerAlias *.www.example.com - Include conf.d/local-log-origin.conf - RewriteEngine On RewriteRule / http://www.example.com/ [R] # RewriteRule /(.*) http://www.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined ServerName www.example.com:443 @@ -26,11 +24,10 @@ ServerName *.www:443 Include conf.d/local-ssl.conf - Include conf.d/local-log-origin.conf RewriteEngine On RewriteRule / http://www.example.com/ [R] # RewriteRule /(.*) http://www.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined diff --git a/moin/apache2/sites-available/wiki.secure-example.com.conf b/moin/apache2/sites-available/wiki.secure-example.com.conf index 5ccca1b..d369624 100644 --- a/moin/apache2/sites-available/wiki.secure-example.com.conf +++ b/moin/apache2/sites-available/wiki.secure-example.com.conf @@ -19,13 +19,12 @@ ServerName *.wiki:443 Include conf.d/local-ssl.conf - Include conf.d/local-log-origin.conf RewriteEngine On RewriteRule / https://wiki.example.com/ [R] # RewriteRule /(.*)? https://wiki.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined ServerName wiki.example.com @@ -33,11 +32,9 @@ ServerAlias wiki ServerAlias *.wiki - Include conf.d/local-log-origin.conf - RewriteEngine On RewriteRule / https://wiki.example.com/ [R] # RewriteRule /(.*)? https://wiki.example.com/$1 [R] - CustomLog ${APACHE_LOG_DIR}/redirect.log origin + CustomLog ${APACHE_LOG_DIR}/redirect.log vhost_combined -- cgit v1.2.3