Comments (4)
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.
from nginx-ui.
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.
from nginx-ui.
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
from nginx-ui.
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;
}
}
from nginx-ui.
Related Issues (20)
- 最新版UI所有的下拉列表,都没法修改值 HOT 4
- 添加站点时能否支持应用自己的基础配置? HOT 1
- docker容器内出现了两个nginx-ui进程 HOT 2
- websocket 的 map 指令不应放在站点里配置 HOT 2
- 内网站点启用TSL不应该添加/.well-known/acme-challenge
- 能否在产品层面支持将HTTPS站点配置到一个server块?
- 访问站点access日志时,没有解析出正确的路径
- 第一个用户应该禁止删除 HOT 1
- Add some suggested configurations to the http directive block
- nginx.conf里缺少动态模块引用
- 反向代理配置中能否添加对RFC 7239的支持?
- Configuration Parse Error HOT 1
- Docker 容器内的多进程建议使用 s6-overlay 管理 HOT 7
- 同一个域名无法共存RSA+ECC双证书
- 站点列表能否增加访问网站的操作?
- ChatGPT 助手无法读取到 include 文件里的指令 HOT 1
- 2.0 beta.17 容器中的 access.log 没有指向 /dev/stdout,这与文档描述不符 HOT 12
- Nginx UI 的默认环境:本地,这个名称能否自己编辑? HOT 3
- include 是单行指令,但是被识别为多行指令了 HOT 1
- Add stats page to Nginx UI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-ui.