-
Description: Current Configuration: version: '3.7'
services:
nginx-proxy:
container_name: nginx-proxy
image: nginxproxy/nginx-proxy
labels:
- com.centurylinklabs.watchtower.scope=infrastructure
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
ports:
- 80:80
- 443:443
volumes:
- certs:/etc/nginx/certs:ro
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./conf/log.conf:/etc/nginx/conf.d/log.conf
- ./conf/uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf
- ./conf/headercustomconf.conf:/etc/nginx/conf.d/headercustomconf.conf
restart: always
networks:
proxy-tier:
internet:
environment:
- ENABLE_IPV6=true
- LOG_FORMAT='$host $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent $request_time "$http_referer" "$http_user_agent" "$upstream_addr"' I have also attempted to set the log format in the environment, without success, to this: - LOG_JSON_FORMAT='{"time_local":"$$time_iso8601","remote_addr":"$$remote_addr","request":"$$request","request_time":"$$request_time","upstream_addr":"$$upstream_addr"}'
|
Beta Was this translation helpful? Give feedback.
Answered by
barnes-c
Nov 28, 2023
Replies: 1 comment
-
I was able to fix it by changing the environment variables to this: environment:
ENABLE_IPV6: 'True'
LOG_FORMAT: "$$remote_addr - $$remote_user [$$time_local] \"$$request\" $$status $$body_bytes_sent \"$$http_referer\" \"$$http_user_agent\" request_time=$$request_time $$upstream_response_time" # - LOG_FORMAT='$$host $$remote_addr - $$remote_user [$$time_local] "$$request" $$status $$body_bytes_sent $$request_time "$$http_referer" "$$http_user_agent" "$$upstream_addr"' |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
barnes-c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was able to fix it by changing the environment variables to this: