nginx custom locations support


jbrodriguez

Recommended Posts

The core idea is to allow unRAID's nginx instance to serve as reverse proxy to dockers and plugins, so you don't need an additional nginx (via a docker or such).

 

Currently, /etc/nginx/nginx.conf has an include at the bottom

include /etc/nginx/conf.d/*.conf;

You could specify a nzbget.conf here and create a server block with a location to proxy 'http(s)://<ip|host>/nzbget' to the nzbget docker, for example.

 

The issue is that the generated emhttp-servers.conf sets its main server block as a 'default_server', so it catches all urls directed at the server.

 

Any other server block is essentially ignored, so nzbget.conf's server/location wouldn't work.

 

The request is to have a

include /etc/nginx/conf.d/locations/*.conf;

as the last line of emhttp-servers.conf's server block.

 

This way nzbget.conf would need just a location block and it would be picked by the main config file.

 

The integrity of emhttp-servers.conf would still be enforced by nginx_test_conf.

 

Hope you can accommodate this.

 

Any other idea/suggestion would be welcome.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.