Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

swag 反向代理自定义docker网络内容器无法通过容器名称转发问题

Featured Replies

我用的是 linuxserver/swag 这个镜像,主要是想给容器访问添加 https 支持

所有容器都连的自定义网桥网络且固定 ip

1250004394_.png.4238516e9902dca9fc959715c17579fb.png

 

打开swag控制台进入容直接 ping emby 能正常解析到 172.20.1.6

1381902591_.png.fd622296b107bd550e70e7f12c7906e4.png

 

然后 swag 内 nginx 配置使用 emby.subdomain.conf.sample 模板的配置,改名成 emby.subdomain.conf 后重启swag 容器。

816070662_.thumb.png.85aa911ef4a53244c021072b3f746d7d.png

 

奇怪的是当我访问  emby.xxxx.xxx 时,报了 502 Bad Gateway 错误。然后查看nginx 错误日志发现无法解析 emby

647560352_.png.4ed11bc9999b7a821cba972435609bb0.png

 

然而我把 emby.subdomain.conf 内参数 upstream_app 的值从emby 改成  172.20.1.6 时,就可以正常访问。

我想知道为什么 swag 容器在能ping通emby容器名的情况下,内置的nginx却无法解析容器名。拜托大家了!!!

 

smzdm上有一篇文章,大概意思是不支持容器间dns服务,必须指明ip地址,需要自己另外创建docker网络

  • Author
On 10/18/2021 at 2:27 PM, Pela said:

smzdm上有一篇文章,大概意思是不支持容器间dns服务,必须指明ip地址,需要自己另外创建docker网络

现在确实是用的 ip 地址来将就用的。。。。。关键的是我另外一个容器 nextcloud 连 mysql 都可以直接用容器名连。。就这个swag 里面的nginx 配置不行。。就很郁闷☹️

  • 3 months later...

不知道你是怎么做的,我是这样

先创建docker网络:docker network create proxy

swag;emby的网络都选新建的网络“proxy”且不分配固定ip

然后swag 的conf配置文件内就直接用emby容器名称

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.