NginxProxyManager / nginx-proxy-manager

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

http_top custom directive should be placed above "Default upstream schema" #3394

Open n3b0r opened 11 months ago

n3b0r commented 11 months ago

Describe the bug The custom http_top.conf file should be injected above Default upstream scheme piece in http.conf file. The current setup avoids customizing map_xxx directive such as map_hash_bucket_size, which is needed when redirection maps are used: https://nginx.org/en/docs/http/ngx_http_map_module.html

The current implementation produces an error when any map_xxx directive is set up.

image

Nginx Proxy Manager Version 2.10.4

To Reproduce Steps to reproduce the behavior:

  1. Create a custom http_top.conf file
  2. Add map_hash_bucket_size 1024; to increase the default map size.
  3. Execute nginx -t to check the config.
  4. See error

Expected behavior If the http_top.conf injection is displaced above the following piece of code in the nginx.conf file, everything works as expected.

Code:

        # Custom
        include /data/nginx/custom/http_top[.]conf;

        # Default upstream scheme
        map $host $forward_scheme {
                default http;
        }

Screenshots image

image

Operating System Docker on AMD64

Additional context

github-actions[bot] commented 4 months ago

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