NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.67k stars 2.64k forks source link

Log format management witin NPM settings #2887

Open dcampillo opened 1 year ago

dcampillo commented 1 year ago

Is your feature request related to a problem? Please describe. Logs are ok, but the format doesn't fit my need in terms of log management through Splunk or Logscale. Log format (Proxy and Standard) can only be modified in the container itself. All changes, would be smashed if I pull a the latest image

Describe the solution you'd like

Describe alternatives you've considered -- The alternative would be to have the logs configuration decoupled from the main configuration and stored in the /data folder

Additional context NPM is really great!!!

alex-swki commented 1 year ago

I personally wanted my logs in a JSON format and added a volume to the container in compose

volumes:
  - ./nginx.conf:/etc/nginx/nginx.conf

here I was able to add a new logformat in the nginx.conf I suggest you just look up a premade logformat from Serverfault or something and put it into your config.

Then navigate to /data/nginx/proxy_host and here are all your configs. Select your specific config and just set the logformat there.

As long as you've bound your config files to your host system, you should be fine repulling the image. I know that I am. Obviously, when making changes to the proxy host config itself, you will have to set the logformat there again as the GUI overrides it all.

github-actions[bot] commented 9 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1: