nginx 内网转发
Last updated on November 20, 2024 am
🧙 Questions
由于服务器只能暴露部分端口,而原有服务的端口号无法修改,需要通过nginx内网转发UI
☄️ Ideas
mkdir -p /tmp/nginx
vim /tmp/nginx/default.conf
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
proxy_pass http://isxcode:39040;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
docker run \
--name isxcode-nginx \
--privileged=true \
--restart=always \
-d \
-p 30188:80 \
-v /tmp/nginx:/etc/nginx/conf.d \
--add-host isxcode:172.23.39.236 \
nginx:1.27.0
🔗 Links
nginx 内网转发
https://ispong.isxcode.com/vue/nginx/nginx 内网转发/