diff --git a/backend/templates/dead_host.conf b/backend/templates/dead_host.conf index d94dff57..d2e90d93 100644 --- a/backend/templates/dead_host.conf +++ b/backend/templates/dead_host.conf @@ -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 %} diff --git a/backend/templates/proxy_host.conf b/backend/templates/proxy_host.conf index dffb0874..eb40157b 100644 --- a/backend/templates/proxy_host.conf +++ b/backend/templates/proxy_host.conf @@ -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 }} @@ -55,7 +57,8 @@ proxy_http_version 1.1; # Proxy! include conf.d/include/proxy.conf; - } + +} {% endif %} # Custom diff --git a/backend/templates/redirection_host.conf b/backend/templates/redirection_host.conf index 339fe72e..0dae7777 100644 --- a/backend/templates/redirection_host.conf +++ b/backend/templates/redirection_host.conf @@ -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 }} diff --git a/docker/rootfs/etc/nginx/nginx.conf b/docker/rootfs/etc/nginx/nginx.conf index 5e026b7a..5acc1f90 100644 --- a/docker/rootfs/etc/nginx/nginx.conf +++ b/docker/rootfs/etc/nginx/nginx.conf @@ -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; diff --git a/local_build.sh b/local_build.sh index a8e49c94..e5fc04e2 100644 --- a/local_build.sh +++ b/local_build.sh @@ -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" \ No newline at end of file +docker run -it -p 80:80 -p 81:81 -v /mnt/c/Projects/nginx-proxy-manager/rootfolder:/data --name data "${IMAGE}:fargate" \ No newline at end of file