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,4 +1,16 @@
|
||||
# Redirect HTTP to HTTPS
|
||||
upstream adminer_backend {
|
||||
server adminer:8080;
|
||||
|
||||
# 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;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
@@ -62,7 +74,7 @@ server {
|
||||
# ssl_dhparam /etc/nginx/ssl/dhparam.pem;
|
||||
|
||||
# Logging
|
||||
access_log /var/log/nginx/adminer.novicelab.io_access.log VCOMBINED;
|
||||
access_log /var/log/nginx/adminer.novicelab.io_access.log json_combined;
|
||||
error_log /var/log/nginx/adminer.novicelab.io_error.log debug;
|
||||
|
||||
# Root and index
|
||||
@@ -70,13 +82,13 @@ server {
|
||||
# index index.html index.htm;
|
||||
|
||||
# include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
set $adminer_backend adminer:8080;
|
||||
# set $adminer_backend adminer:8080;
|
||||
|
||||
location / { #/adminer {
|
||||
# rewrite ^/adminer/(.*)$ /$1 break;
|
||||
|
||||
# proxy_pass http://10.0.0.251:9080/;
|
||||
proxy_pass http://$adminer_backend;
|
||||
proxy_pass http://adminer_backend;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
Reference in New Issue
Block a user