Skip to content

Commit deca493

Browse files
committed
Splits access and error logs for each host
1 parent d16bf7d commit deca493

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

backend/templates/dead_host.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ server {
77
{% include "_hsts.conf" %}
88
{% include "_forced_ssl.conf" %}
99

10-
access_log /data/logs/dead_host-{{ id }}.log standard;
10+
access_log /data/logs/dead-host-{{ id }}_access.log standard;
11+
error_log /data/logs/dead-host-{{ id }}_error.log warn;
1112

1213
{{ advanced_config }}
1314

backend/templates/default.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ server {
1212
#listen [::]:80;
1313
{% endif %}
1414
server_name default-host.localhost;
15-
access_log /data/logs/default_host.log combined;
15+
access_log /data/logs/default-host_access.log combined;
16+
error_log /data/logs/default-host_error.log warn;
1617
{% include "_exploits.conf" %}
1718

1819
{%- if value == "404" %}

backend/templates/letsencrypt-request.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ server {
88

99
server_name {{ domain_names | join: " " }};
1010

11-
access_log /data/logs/letsencrypt-requests.log standard;
11+
access_log /data/logs/letsencrypt-requests_access.log standard;
12+
error_log /data/logs/letsencrypt-requests_error.log warn;
1213

1314
include conf.d/include/letsencrypt-acme-challenge.conf;
1415

backend/templates/proxy_host.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ proxy_set_header Connection $http_connection;
1919
proxy_http_version 1.1;
2020
{% endif %}
2121

22-
23-
access_log /data/logs/proxy_host-{{ id }}.log proxy;
22+
access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
23+
error_log /data/logs/proxy-host-{{ id }}_error.log warn;
2424

2525
{{ advanced_config }}
2626

backend/templates/redirection_host.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ server {
99
{% include "_hsts.conf" %}
1010
{% include "_forced_ssl.conf" %}
1111

12-
access_log /data/logs/redirection_host-{{ id }}.log standard;
12+
access_log /data/logs/redirection-host-{{ id }}_access.log standard;
13+
error_log /data/logs/redirection-host-{{ id }}_error.log warn;
1314

1415
{{ advanced_config }}
1516

docker/rootfs/etc/nginx/conf.d/default.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ server {
88
set $port "80";
99

1010
server_name localhost-nginx-proxy-manager;
11-
access_log /data/logs/default.log standard;
11+
access_log /data/logs/fallback-access.log standard;
1212
error_log /dev/null crit;
1313
include conf.d/include/assets.conf;
1414
include conf.d/include/block-exploits.conf;
@@ -29,7 +29,7 @@ server {
2929
set $port "443";
3030

3131
server_name localhost;
32-
access_log /data/logs/default.log standard;
32+
access_log /data/logs/fallback-access.log standard;
3333
error_log /dev/null crit;
3434
ssl_certificate /data/nginx/dummycert.pem;
3535
ssl_certificate_key /data/nginx/dummykey.pem;

docker/rootfs/etc/nginx/nginx.conf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ worker_processes auto;
99
# Enables the use of JIT for regular expressions to speed-up their processing.
1010
pcre_jit on;
1111

12-
error_log /data/logs/error.log warn;
12+
error_log /data/logs/fallback-error.log warn;
1313

1414
# Includes files with directives to load dynamic modules.
1515
include /etc/nginx/modules/*.conf;
@@ -46,8 +46,7 @@ http {
4646
log_format proxy '[$time_local] $upstream_cache_status $upstream_status $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] [Sent-to $server] "$http_user_agent" "$http_referer"';
4747
log_format standard '[$time_local] $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] "$http_user_agent" "$http_referer"';
4848

49-
50-
access_log /data/logs/default.log proxy;
49+
access_log /data/logs/fallback-access.log proxy;
5150

5251
# Dynamically generated resolvers file
5352
include /etc/nginx/conf.d/include/resolvers.conf;

0 commit comments

Comments
 (0)