Splits access and error logs for each host
This commit is contained in:
parent
d16bf7d6c0
commit
deca493912
@ -7,7 +7,8 @@ server {
|
||||
{% include "_hsts.conf" %}
|
||||
{% include "_forced_ssl.conf" %}
|
||||
|
||||
access_log /data/logs/dead_host-{{ id }}.log standard;
|
||||
access_log /data/logs/dead-host-{{ id }}_access.log standard;
|
||||
error_log /data/logs/dead-host-{{ id }}_error.log warn;
|
||||
|
||||
{{ advanced_config }}
|
||||
|
||||
|
@ -12,7 +12,8 @@ server {
|
||||
#listen [::]:80;
|
||||
{% endif %}
|
||||
server_name default-host.localhost;
|
||||
access_log /data/logs/default_host.log combined;
|
||||
access_log /data/logs/default-host_access.log combined;
|
||||
error_log /data/logs/default-host_error.log warn;
|
||||
{% include "_exploits.conf" %}
|
||||
|
||||
{%- if value == "404" %}
|
||||
|
@ -8,7 +8,8 @@ server {
|
||||
|
||||
server_name {{ domain_names | join: " " }};
|
||||
|
||||
access_log /data/logs/letsencrypt-requests.log standard;
|
||||
access_log /data/logs/letsencrypt-requests_access.log standard;
|
||||
error_log /data/logs/letsencrypt-requests_error.log warn;
|
||||
|
||||
include conf.d/include/letsencrypt-acme-challenge.conf;
|
||||
|
||||
|
@ -19,8 +19,8 @@ proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
{% endif %}
|
||||
|
||||
|
||||
access_log /data/logs/proxy_host-{{ id }}.log proxy;
|
||||
access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
|
||||
error_log /data/logs/proxy-host-{{ id }}_error.log warn;
|
||||
|
||||
{{ advanced_config }}
|
||||
|
||||
|
@ -9,7 +9,8 @@ server {
|
||||
{% include "_hsts.conf" %}
|
||||
{% include "_forced_ssl.conf" %}
|
||||
|
||||
access_log /data/logs/redirection_host-{{ id }}.log standard;
|
||||
access_log /data/logs/redirection-host-{{ id }}_access.log standard;
|
||||
error_log /data/logs/redirection-host-{{ id }}_error.log warn;
|
||||
|
||||
{{ advanced_config }}
|
||||
|
||||
|
@ -8,7 +8,7 @@ server {
|
||||
set $port "80";
|
||||
|
||||
server_name localhost-nginx-proxy-manager;
|
||||
access_log /data/logs/default.log standard;
|
||||
access_log /data/logs/fallback-access.log standard;
|
||||
error_log /dev/null crit;
|
||||
include conf.d/include/assets.conf;
|
||||
include conf.d/include/block-exploits.conf;
|
||||
@ -29,7 +29,7 @@ server {
|
||||
set $port "443";
|
||||
|
||||
server_name localhost;
|
||||
access_log /data/logs/default.log standard;
|
||||
access_log /data/logs/fallback-access.log standard;
|
||||
error_log /dev/null crit;
|
||||
ssl_certificate /data/nginx/dummycert.pem;
|
||||
ssl_certificate_key /data/nginx/dummykey.pem;
|
||||
|
@ -9,7 +9,7 @@ worker_processes auto;
|
||||
# Enables the use of JIT for regular expressions to speed-up their processing.
|
||||
pcre_jit on;
|
||||
|
||||
error_log /data/logs/error.log warn;
|
||||
error_log /data/logs/fallback-error.log warn;
|
||||
|
||||
# Includes files with directives to load dynamic modules.
|
||||
include /etc/nginx/modules/*.conf;
|
||||
@ -46,8 +46,7 @@ http {
|
||||
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"';
|
||||
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"';
|
||||
|
||||
|
||||
access_log /data/logs/default.log proxy;
|
||||
access_log /data/logs/fallback-access.log proxy;
|
||||
|
||||
# Dynamically generated resolvers file
|
||||
include /etc/nginx/conf.d/include/resolvers.conf;
|
||||
|
Loading…
Reference in New Issue
Block a user