mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 15:53:33 +00:00 
			
		
		
		
	Splits access and error logs for each host
This commit is contained in:
		| @@ -7,7 +7,8 @@ server { | |||||||
| {% include "_hsts.conf" %} | {% include "_hsts.conf" %} | ||||||
| {% include "_forced_ssl.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 }} | {{ advanced_config }} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -12,7 +12,8 @@ server { | |||||||
|   #listen [::]:80; |   #listen [::]:80; | ||||||
| {% endif %} | {% endif %} | ||||||
|   server_name default-host.localhost; |   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" %} | {% include "_exploits.conf" %} | ||||||
|  |  | ||||||
| {%- if value == "404" %} | {%- if value == "404" %} | ||||||
|   | |||||||
| @@ -8,7 +8,8 @@ server { | |||||||
|  |  | ||||||
|   server_name {{ domain_names | join: " " }}; |   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; |   include conf.d/include/letsencrypt-acme-challenge.conf; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -19,8 +19,8 @@ proxy_set_header Connection $http_connection; | |||||||
| proxy_http_version 1.1; | proxy_http_version 1.1; | ||||||
| {% endif %} | {% endif %} | ||||||
|  |  | ||||||
|  |   access_log /data/logs/proxy-host-{{ id }}_access.log proxy; | ||||||
|   access_log /data/logs/proxy_host-{{ id }}.log proxy; |   error_log /data/logs/proxy-host-{{ id }}_error.log warn; | ||||||
|  |  | ||||||
| {{ advanced_config }} | {{ advanced_config }} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -9,7 +9,8 @@ server { | |||||||
| {% include "_hsts.conf" %} | {% include "_hsts.conf" %} | ||||||
| {% include "_forced_ssl.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 }} | {{ advanced_config }} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ server { | |||||||
| 	set $port "80"; | 	set $port "80"; | ||||||
|  |  | ||||||
| 	server_name localhost-nginx-proxy-manager; | 	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; | 	error_log /dev/null crit; | ||||||
| 	include conf.d/include/assets.conf; | 	include conf.d/include/assets.conf; | ||||||
| 	include conf.d/include/block-exploits.conf; | 	include conf.d/include/block-exploits.conf; | ||||||
| @@ -29,7 +29,7 @@ server { | |||||||
| 	set $port "443"; | 	set $port "443"; | ||||||
|  |  | ||||||
| 	server_name localhost; | 	server_name localhost; | ||||||
| 	access_log /data/logs/default.log standard; | 	access_log /data/logs/fallback-access.log standard; | ||||||
| 	error_log /dev/null crit; | 	error_log /dev/null crit; | ||||||
| 	ssl_certificate /data/nginx/dummycert.pem; | 	ssl_certificate /data/nginx/dummycert.pem; | ||||||
| 	ssl_certificate_key /data/nginx/dummykey.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. | # Enables the use of JIT for regular expressions to speed-up their processing. | ||||||
| pcre_jit on; | 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. | # Includes files with directives to load dynamic modules. | ||||||
| include /etc/nginx/modules/*.conf; | 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 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"'; | 	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/fallback-access.log proxy; | ||||||
| 	access_log /data/logs/default.log proxy; |  | ||||||
|  |  | ||||||
| 	# Dynamically generated resolvers file | 	# Dynamically generated resolvers file | ||||||
| 	include /etc/nginx/conf.d/include/resolvers.conf; | 	include /etc/nginx/conf.d/include/resolvers.conf; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user