Skip to content

Commit

Permalink
Improve apache and nginx logging and settings
Browse files Browse the repository at this point in the history
* Moved nginx logging conf to nginx/vhost.common.d/10-log.conf
* Set nginx logging level to warn
* Moved nginx general vhost settings to nginx/vhost.common.d/10-settings.conf
* Set apache logging to /docker.stdout and /docker.stderr
  • Loading branch information
mblaschke committed Mar 27, 2017
1 parent 32d11da commit 7c5874c
Show file tree
Hide file tree
Showing 188 changed files with 244 additions and 528 deletions.
4 changes: 2 additions & 2 deletions docker/apache/alpine-3/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/centos-7/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/debian-7/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/debian-8/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/debian-9/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/ubuntu-12.04/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/ubuntu-14.04/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/ubuntu-15.04/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/ubuntu-15.10/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/ubuntu-16.04/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
4 changes: 2 additions & 2 deletions docker/apache/ubuntu-16.10/conf/etc/httpd/conf.d/10-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
LogLevel warn
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
CustomLog /docker.stdout dockerlog
ErrorLog /docker.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50m;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr warn;
10 changes: 0 additions & 10 deletions docker/hhvm-nginx/ubuntu-14.04/conf/etc/nginx/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
}

Expand All @@ -25,14 +20,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
include /opt/docker/etc/nginx/vhost.ssl.conf;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50m;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr warn;
10 changes: 0 additions & 10 deletions docker/hhvm-nginx/ubuntu-16.04/conf/etc/nginx/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
}

Expand All @@ -25,14 +20,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
include /opt/docker/etc/nginx/vhost.ssl.conf;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr info;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50m;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr warn;
10 changes: 0 additions & 10 deletions docker/nginx/alpine-3/conf/etc/nginx/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
}

Expand All @@ -25,14 +20,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
include /opt/docker/etc/nginx/vhost.ssl.conf;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50m;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr warn;
10 changes: 0 additions & 10 deletions docker/nginx/centos-7/conf/etc/nginx/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
}

Expand All @@ -25,14 +20,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
include /opt/docker/etc/nginx/vhost.ssl.conf;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50m;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr warn;
10 changes: 0 additions & 10 deletions docker/nginx/debian-7/conf/etc/nginx/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
}

Expand All @@ -25,14 +20,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
include /opt/docker/etc/nginx/vhost.ssl.conf;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50m;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr warn;
10 changes: 0 additions & 10 deletions docker/nginx/debian-8/conf/etc/nginx/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
}

Expand All @@ -25,14 +20,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
include /opt/docker/etc/nginx/vhost.ssl.conf;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50m;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr warn;
10 changes: 0 additions & 10 deletions docker/nginx/debian-9/conf/etc/nginx/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
}

Expand All @@ -25,14 +20,9 @@ server {

server_name _ <ALIAS_DOMAIN> docker;

access_log /docker.stdout;
error_log /docker.stdout info;

root "<DOCUMENT_ROOT>";
index <DOCUMENT_INDEX>;

client_max_body_size 50m;

include /opt/docker/etc/nginx/vhost.common.d/*.conf;
include /opt/docker/etc/nginx/vhost.ssl.conf;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 50m;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
access_log /docker.stdout;
error_log /docker.stderr warn;

0 comments on commit 7c5874c

Please sign in to comment.