[GH-ISSUE #256] Is it possible to simply manage NGINX on host via docker deployment? #5911

Closed
opened 2026-03-01 17:08:00 +03:00 by kerem · 4 comments
Owner

Originally created by @Jas-SinghFSU on GitHub (Jan 14, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/256

I am running NGINX via Openresty /usr/local/openresty/nginx and I want to simply use this application as a UI to modify configurations. Is it possible to use the Docker image to do that? I don't want to deploy another NGINX; strictly only want a nice user interface which this app provides.

Originally created by @Jas-SinghFSU on GitHub (Jan 14, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/256 I am running NGINX via Openresty `/usr/local/openresty/nginx` and I want to simply use this application as a UI to modify configurations. Is it possible to use the Docker image to do that? I don't want to deploy another NGINX; strictly only want a nice user interface which this app provides.
kerem closed this issue 2026-03-01 17:08:00 +03:00
Author
Owner

@jtrumpio commented on GitHub (Jan 14, 2024):

It should be possible if you host the configs externally (eg on NFS), and then mount the volumes/paths appropriately. This way ngnix-ui modifies the configs, and your openresty instance reads those configs. You'll of course have to reload nginx on your openresty install.

Or in my case, just use nginx-ui itself as a reverse proxy, and set your openresty as the upstream target.

<!-- gh-comment-id:1891008776 --> @jtrumpio commented on GitHub (Jan 14, 2024): It should be possible if you host the configs externally (eg on NFS), and then mount the volumes/paths appropriately. This way ngnix-ui modifies the configs, and your openresty instance reads those configs. You'll of course have to reload nginx on your openresty install. Or in my case, just use nginx-ui itself as a reverse proxy, and set your openresty as the upstream target.
Author
Owner

@Jas-SinghFSU commented on GitHub (Jan 15, 2024):

Ah gotcha. Just mount the files so I can edit them but operations like restart will probably need to happen on the host right?

I'm not sure I understand the second part though.

<!-- gh-comment-id:1892783196 --> @Jas-SinghFSU commented on GitHub (Jan 15, 2024): Ah gotcha. Just mount the files so I can edit them but operations like restart will probably need to happen on the host right? I'm not sure I understand the second part though.
Author
Owner

@0xJacky commented on GitHub (Jan 16, 2024):

Hi @Jas-SinghFSU, if you are running nginx-ui on host, you can modify nginx section of the app.ini file, so that you can reload or restart your nginx docker. Please check our documents for more infomation. https://nginxui.com/guide/config-nginx.html#service-monitoring-and-control

<!-- gh-comment-id:1892937922 --> @0xJacky commented on GitHub (Jan 16, 2024): Hi @Jas-SinghFSU, if you are running nginx-ui on host, you can modify nginx section of the app.ini file, so that you can reload or restart your nginx docker. Please check our documents for more infomation. https://nginxui.com/guide/config-nginx.html#service-monitoring-and-control
Author
Owner

@jtrumpio commented on GitHub (Jan 16, 2024):

Ah gotcha. Just mount the files so I can edit them but operations like restart will probably need to happen on the host right?

I'm not sure I understand the second part though.

Here's what I did - essentially nginx acts as a reverse proxy to nginx-ui:

dlb.blah.com (dlb = docker load balancer in my case) is a cname to your host running nginx and the url you'll use to access nginx-ui. So essentially when you hit dlb.blah.com it will reverse proxy it to the nginx-ui interface. You can then add your additional site configs. Depending on your use case you may want to wrap some additional security around this at a minimum ip restrictions for example and of course SSL. Also as a disclaimer I am not an nginx expert, this is just what I figured out on my own so hopefully it is helpful.

upstream dlb {
    server 127.0.0.1:9000;
}
server {
    listen 80;
    listen [::]:80;
    server_name dlb.blah.com;
    return 307 https://$server_name$request_uri;     
    location /.well-known/acme-challenge {
        proxy_set_header Host $host;
        proxy_set_header X-Real_IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
        proxy_set_header Upgrade websocket;
        proxy_set_header Connection Upgrade;
        proxy_pass http://127.0.0.1:9180;
    }
}
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name dlb.blah.com;
    ssl_certificate /etc/nginx/ssl/dlb.blah.com/fullchain.cer;
    ssl_certificate_key /etc/nginx/ssl/dlb.blah.com/private.key;
    location /.well-known/acme-challenge {
        proxy_set_header Host $host;
        proxy_set_header X-Real_IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
        proxy_pass http://127.0.0.1:9180;
    }
    location / {
        proxy_set_header Upgrade websocket;
        proxy_set_header Connection Upgrade;
        proxy_pass http://dlb;
    }
}
<!-- gh-comment-id:1892943775 --> @jtrumpio commented on GitHub (Jan 16, 2024): > Ah gotcha. Just mount the files so I can edit them but operations like restart will probably need to happen on the host right? > > I'm not sure I understand the second part though. Here's what I did - essentially nginx acts as a reverse proxy to nginx-ui: dlb.blah.com (dlb = docker load balancer in my case) is a cname to your host running nginx and the url you'll use to access nginx-ui. So essentially when you hit dlb.blah.com it will reverse proxy it to the nginx-ui interface. You can then add your additional site configs. Depending on your use case you may want to wrap some additional security around this at a minimum ip restrictions for example and of course SSL. Also as a disclaimer I am not an nginx expert, this is just what I figured out on my own so hopefully it is helpful. ``` upstream dlb { server 127.0.0.1:9000; } server { listen 80; listen [::]:80; server_name dlb.blah.com; return 307 https://$server_name$request_uri; location /.well-known/acme-challenge { proxy_set_header Host $host; proxy_set_header X-Real_IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr:$remote_port; proxy_set_header Upgrade websocket; proxy_set_header Connection Upgrade; proxy_pass http://127.0.0.1:9180; } } server { listen 443 ssl; listen [::]:443 ssl; server_name dlb.blah.com; ssl_certificate /etc/nginx/ssl/dlb.blah.com/fullchain.cer; ssl_certificate_key /etc/nginx/ssl/dlb.blah.com/private.key; location /.well-known/acme-challenge { proxy_set_header Host $host; proxy_set_header X-Real_IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr:$remote_port; proxy_pass http://127.0.0.1:9180; } location / { proxy_set_header Upgrade websocket; proxy_set_header Connection Upgrade; proxy_pass http://dlb; } } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#5911
No description provided.