mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-15 21:36:51 +00:00
move to a unified log, stopping all access logs for individual sites.
This commit is contained in:
@@ -7,8 +7,9 @@ server {
|
||||
{% include "_hsts.conf" %}
|
||||
{% include "_forced_ssl.conf" %}
|
||||
|
||||
access_log /data/logs/dead-host-{{ id }}_access.log standard;
|
||||
error_log /data/logs/dead-host-{{ id }}_error.log warn;
|
||||
#disable individual logs
|
||||
#access_log /data/logs/dead-host-{{ id }}_access.log standard;
|
||||
#error_log /data/logs/dead-host-{{ id }}_error.log warn;
|
||||
|
||||
{{ advanced_config }}
|
||||
|
||||
@@ -18,6 +19,8 @@ server {
|
||||
return 404;
|
||||
}
|
||||
{% endif %}
|
||||
# Custom
|
||||
include /data/nginx/custom/server_dead[.]conf;
|
||||
|
||||
}
|
||||
{% endif %}
|
||||
|
@@ -4,6 +4,7 @@
|
||||
server {
|
||||
set $forward_scheme {{ forward_scheme }};
|
||||
set $server "{{ forward_host }}";
|
||||
set $path "{{ forward_path }}";
|
||||
set $port {{ forward_port }};
|
||||
|
||||
{% include "_listen.conf" %}
|
||||
@@ -19,8 +20,9 @@ proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
{% endif %}
|
||||
|
||||
access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
|
||||
error_log /data/logs/proxy-host-{{ id }}_error.log warn;
|
||||
#disabling individual logs
|
||||
#access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
|
||||
#error_log /data/logs/proxy-host-{{ id }}_error.log warn;
|
||||
|
||||
{{ advanced_config }}
|
||||
|
||||
@@ -64,7 +66,8 @@ proxy_http_version 1.1;
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
#do the proxy!
|
||||
proxy_pass $forward_scheme://$server:$port$path$request_uri;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
@@ -9,8 +9,9 @@ server {
|
||||
{% include "_hsts.conf" %}
|
||||
{% include "_forced_ssl.conf" %}
|
||||
|
||||
access_log /data/logs/redirection-host-{{ id }}_access.log standard;
|
||||
error_log /data/logs/redirection-host-{{ id }}_error.log warn;
|
||||
#disabling individual logs
|
||||
#access_log /data/logs/redirection-host-{{ id }}_access.log standard;
|
||||
#error_log /data/logs/redirection-host-{{ id }}_error.log warn;
|
||||
|
||||
{{ advanced_config }}
|
||||
|
||||
|
@@ -45,12 +45,10 @@ 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"';
|
||||
log_format cloudwatch escape=json '{"time":"$time_iso8601","filename":"$request_filename","remoteIP":"$remote_addr","host":"$host","request":"$request","query":"$query_string","method":"$request_method","status":"$status","userAgent":"$http_user_agent","referer":"$http_referer"}';
|
||||
|
||||
|
||||
|
||||
access_log /data/logs/fallback_access.log proxy;
|
||||
access_log /data/logs/fallback_access.cloudwatch.log cloudwatch;
|
||||
|
||||
|
||||
# Dynamically generated resolvers file
|
||||
include /etc/nginx/conf.d/include/resolvers.conf;
|
||||
|
||||
|
@@ -9,6 +9,7 @@ aws ecr get-login-password --region us-east-1 | docker login --username AWS --pa
|
||||
|
||||
IMAGE="owenscorning/aws-nginx-full"
|
||||
DOCKER_IMAGE="413067109875.dkr.ecr.us-east-1.amazonaws.com/${IMAGE}:certbot-node"
|
||||
FINISH_IMAGE="413067109875.dkr.ecr.us-east-1.amazonaws.com/${IMAGE}:fargate"
|
||||
BUILD_VERSION=`cat .version`
|
||||
MAJOR_VERSION="2"
|
||||
BRANCH_LOWER="master"
|
||||
@@ -20,10 +21,10 @@ docker run --rm \
|
||||
-w /app \
|
||||
${IMAGE}:certbot-node \
|
||||
sh -c "yarn install && yarn eslint . && rm -rf node_modules"
|
||||
|
||||
echo "-----------------"
|
||||
echo 'Docker Build ...'
|
||||
docker build --pull --no-cache --squash --compress \
|
||||
-t "${IMAGE}:production" \
|
||||
-t "${IMAGE}:fargate" \
|
||||
-f docker/Dockerfile \
|
||||
--build-arg TARGETPLATFORM=linux/amd64 \
|
||||
--build-arg BUILDPLATFORM=linux/amd64 \
|
||||
@@ -31,4 +32,4 @@ docker build --pull --no-cache --squash --compress \
|
||||
--build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \
|
||||
.
|
||||
|
||||
docker run -it -p 80:80 -p 81:81 -v /mnt/c/Projects/nginx-proxy-manager/rootfolder:/data --name data "${IMAGE}:production"
|
||||
docker run -it -p 80:80 -p 81:81 -v /mnt/c/Projects/nginx-proxy-manager/rootfolder:/data --name data "${IMAGE}:fargate"
|
Reference in New Issue
Block a user