Jump to content

docker选择br0后不能进行反向代理


Recommended Posts

1、通过命令创建网络hyx

docker network create hyx

2、反向代理软件选择是linuxserver/swag    network type:custom:hyx,用于代理其实docker

Q1.thumb.png.36e69ac3709fe0b940fa0d009b19bfe3.png

3、因另外一个docker:linuxserver/nginx需要固定IP,用于内外网使用,所以网络为network type:custom:bro   Fixed IP address :192.168.16.88,Q2.thumb.png.53232b86cd1f64cefb57f91bf8327994.png

相应的*.subdomain.conf文件为:

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name mb.xxxx.xxx;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;


    location / {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app 192.168.16.88;
        set $upstream_port 80;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}

4、输入192.168.16.88正常运行,输入外网地址不能运行,显示为:502 Bad Gateway

Q3.thumb.png.4cdea060b2d70c172096e1cd401a8d71.pngQ4.thumb.png.4e3839d125692382db62db60efafc210.png

5、linuxserver/nginx为network type:custom:Bridge,并调整*.subdomain.conf文件,连接外网可以正常运行;如果在network type:custom:bro中运行,该如何处理呢?期望解决方法,非常感谢!!!

Edited by husthuyx
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.

×
×
  • Create New...