gilyes / docker-nginx-letsencrypt-sample

Dockerized Nginx + Let's Encrypt sample
https://gilyes.com/docker-nginx-letsencrypt
385 stars 185 forks source link

log format can't change #14

Open zw231212 opened 5 years ago

zw231212 commented 5 years ago

Change the log_format in nginx.tmpl did not work.

log_format vhost '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" '
                      '$request_time $upstream_response_time';

the access_log is still the old format

XXXX - - [11/Oct/2019:06:24:56 +0000] "GET /static/js/amazeui.min.js HTTP/1.1" 304 0 "XXXXX" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36" "XXXXX"
XXXX - - [11/Oct/2019:06:24:56 +0000] "GET /static/fonts/fontawesome-webfont.woff2?v=4.5.0 HTTP/1.1" 304 0 "XXXX" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36" "XXXX"