-
Hi I installed nging proxy manager using the provided script and it runs fine so far. To do so, I need to change the logs.conf file so that "additionally" a json format logfile is written. my current conf file now looks like: `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"'; access_log /data/logs/fallback_access.log proxy; log_format json_analytics escape=json '{' access_log /data/logs/json_access.log json_analytics;` just the json analytics stuff is new. Unfortunately it seems that nginx is not writing anything into the logfile. The normal access logfiles are updates, but the json file stays empty. Am I missing something here? Additionally: how can I enable geoip support after installed using the script? thanks a lot in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I moved the config into a new, dedicated file now: /etc/nginx/conf.d/jsonlog.conf in /etc/nginx/conf/nginx.conf this directory should be read and I assume it does as the file gets created when I restart. I guess it's loaded correctly but I need to add the directive to load the conf file into the proxy host default file? |
Beta Was this translation helpful? Give feedback.
figured it out: jsonlog.conf is loaded, but I had to add the access_log /data/logs/json_access.log json_analytics; instructions to the proxyhost.conf file.
I also edited the /app/templates template for new proxy hosts.
works fine so far.