Nginx reverse proxy manager

Aus Laub-Home Wiki

Custom Headers

1. Volume for config in docker compose file:

    [..]
    volumes:
      - ./volumes/data:/data

2. Create custom configs in volumes/data/nginx/custom/ e.g. server_proxy.conf

https://nginxproxymanager.com/advanced-config/#custom-nginx-configurations

3. Test nginx cfg

# test nginx cfg
nginx -t

Errors

could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64

1. Create custom server_proxy.conf in volumes/data/nginx/custom/

proxy_headers_hash_max_size 1024;
proxy_headers_hash_bucket_size 128;

2. Test nginx cfg

# test nginx cfg
nginx -t

3. Increase values in 1. until error is gone

Occasional 502 connect errors

Sometimes there are 502 connector errors in the first requests, especially for proxy hosts.

Try #1)

didnt make the situation better

/data/nginx/custom/server_proxy.conf

proxy_connect_timeout 60s;
proxy_read_timeout 60s;
proxy_send_timeout 60s;

Try #2)

regarding https://stackoverflow.com/a/62176335 and https://www.getpagespeed.com/server-setup/nginx/tuning-proxy_buffer_size-in-nginx

/data/nginx/custom/http_top.conf

proxy_buffering off;
proxy_buffer_size 16k;
proxy_busy_buffers_size 24k;
proxy_buffers 64 4k;