Set access log format and Upstream
Set access log format to json_combined Switch from $backend_variable to upstream (Except for harbor, plane-minio, goaccess, opencloud)
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
upstream hugo_backend {
|
||||
server hugo:1313;
|
||||
|
||||
# Keep up to 32 idle connections per worker
|
||||
keepalive 16;
|
||||
|
||||
# Maximum time a connection can be idle
|
||||
keepalive_timeout 60s;
|
||||
|
||||
# Maximum requests per keepalive connection
|
||||
keepalive_requests 100;
|
||||
}
|
||||
|
||||
# # Redirect HTTP to HTTPS
|
||||
server {
|
||||
listen 80;
|
||||
@@ -62,7 +75,7 @@ server {
|
||||
# ssl_dhparam /etc/nginx/ssl/dhparam.pem;
|
||||
|
||||
# Logging
|
||||
access_log /var/log/nginx/novicelab.io_access.log VCOMBINED;
|
||||
access_log /var/log/nginx/novicelab.io_access.log json_combined;
|
||||
error_log /var/log/nginx/novicelab.io_error.log debug;
|
||||
|
||||
# Root and index
|
||||
@@ -73,11 +86,11 @@ server {
|
||||
# include /etc/nginx/cloudflare-ips.conf;
|
||||
|
||||
# include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
set $hugo_backend hugo:1313;
|
||||
# set $hugo_backend hugo:1313;
|
||||
|
||||
location / {
|
||||
# proxy_pass http://10.0.0.251:9200/;
|
||||
proxy_pass http://$hugo_backend;
|
||||
proxy_pass http://hugo_backend;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user