mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-16 22:06:51 +00:00
Merge pull request #4 from ncraig-oc/cloudwatchLogs
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 "_hsts.conf" %}
|
||||||
{% include "_forced_ssl.conf" %}
|
{% include "_forced_ssl.conf" %}
|
||||||
|
|
||||||
access_log /data/logs/dead-host-{{ id }}_access.log standard;
|
#disable individual logs
|
||||||
error_log /data/logs/dead-host-{{ id }}_error.log warn;
|
#access_log /data/logs/dead-host-{{ id }}_access.log standard;
|
||||||
|
#error_log /data/logs/dead-host-{{ id }}_error.log warn;
|
||||||
|
|
||||||
{{ advanced_config }}
|
{{ advanced_config }}
|
||||||
|
|
||||||
@@ -18,6 +19,8 @@ server {
|
|||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
# Custom
|
||||||
|
include /data/nginx/custom/server_dead[.]conf;
|
||||||
|
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
server {
|
server {
|
||||||
set $forward_scheme {{ forward_scheme }};
|
set $forward_scheme {{ forward_scheme }};
|
||||||
set $server "{{ forward_host }}";
|
set $server "{{ forward_host }}";
|
||||||
|
set $path "{{ forward_path }}";
|
||||||
set $port {{ forward_port }};
|
set $port {{ forward_port }};
|
||||||
|
|
||||||
{% include "_listen.conf" %}
|
{% include "_listen.conf" %}
|
||||||
@@ -19,8 +20,9 @@ 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;
|
#disabling individual logs
|
||||||
error_log /data/logs/proxy-host-{{ id }}_error.log warn;
|
#access_log /data/logs/proxy-host-{{ id }}_access.log proxy;
|
||||||
|
#error_log /data/logs/proxy-host-{{ id }}_error.log warn;
|
||||||
|
|
||||||
{{ advanced_config }}
|
{{ advanced_config }}
|
||||||
|
|
||||||
@@ -55,7 +57,8 @@ proxy_http_version 1.1;
|
|||||||
|
|
||||||
# Proxy!
|
# Proxy!
|
||||||
include conf.d/include/proxy.conf;
|
include conf.d/include/proxy.conf;
|
||||||
}
|
|
||||||
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Custom
|
# Custom
|
||||||
|
@@ -9,8 +9,9 @@ server {
|
|||||||
{% include "_hsts.conf" %}
|
{% include "_hsts.conf" %}
|
||||||
{% include "_forced_ssl.conf" %}
|
{% include "_forced_ssl.conf" %}
|
||||||
|
|
||||||
access_log /data/logs/redirection-host-{{ id }}_access.log standard;
|
#disabling individual logs
|
||||||
error_log /data/logs/redirection-host-{{ id }}_error.log warn;
|
#access_log /data/logs/redirection-host-{{ id }}_access.log standard;
|
||||||
|
#error_log /data/logs/redirection-host-{{ id }}_error.log warn;
|
||||||
|
|
||||||
{{ advanced_config }}
|
{{ advanced_config }}
|
||||||
|
|
||||||
|
@@ -45,11 +45,9 @@ 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"';
|
||||||
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.log proxy;
|
||||||
access_log /data/logs/fallback_access.cloudwatch.log cloudwatch;
|
|
||||||
|
|
||||||
# Dynamically generated resolvers file
|
# Dynamically generated resolvers file
|
||||||
include /etc/nginx/conf.d/include/resolvers.conf;
|
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"
|
IMAGE="owenscorning/aws-nginx-full"
|
||||||
DOCKER_IMAGE="413067109875.dkr.ecr.us-east-1.amazonaws.com/${IMAGE}:certbot-node"
|
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`
|
BUILD_VERSION=`cat .version`
|
||||||
MAJOR_VERSION="2"
|
MAJOR_VERSION="2"
|
||||||
BRANCH_LOWER="master"
|
BRANCH_LOWER="master"
|
||||||
@@ -20,10 +21,10 @@ docker run --rm \
|
|||||||
-w /app \
|
-w /app \
|
||||||
${IMAGE}:certbot-node \
|
${IMAGE}:certbot-node \
|
||||||
sh -c "yarn install && yarn eslint . && rm -rf node_modules"
|
sh -c "yarn install && yarn eslint . && rm -rf node_modules"
|
||||||
|
echo "-----------------"
|
||||||
echo 'Docker Build ...'
|
echo 'Docker Build ...'
|
||||||
docker build --pull --no-cache --squash --compress \
|
docker build --pull --no-cache --squash --compress \
|
||||||
-t "${IMAGE}:production" \
|
-t "${IMAGE}:fargate" \
|
||||||
-f docker/Dockerfile \
|
-f docker/Dockerfile \
|
||||||
--build-arg TARGETPLATFORM=linux/amd64 \
|
--build-arg TARGETPLATFORM=linux/amd64 \
|
||||||
--build-arg BUILDPLATFORM=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')" \
|
--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