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连接失败

Featured Replies

如题。

我的网络环境:

ros+openwrt

unraid 6.10.3的网关、dns指向openwrt,按照https://post.smzdm.com/p/akxzqzzk/ 教程安装了swag,ddns为duckdns,启动后log显示server ready,ddns指向的ip正确,但是里外网均连接失败,路由器里已将外网4443端口转发到unraid的443端口。请教还有哪里设置的不对?

swag 我的配置文件如下,供参考

# unraid
server {
    listen 443 ssl;
    #listen [::]:443;
    server_name unraid.*;

    include /config/nginx/ssl.conf;
    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app 192.168.3.4;
        set $upstream_port 80;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}

 

另外管理权限设置ssl使用为否,也就是通过http://192.168.3.4能实现内网访问,通过swag反向代理功能,实现外网与swag之间https连接,swag与unraid之间(内网)http连接。

356029286__2022-06-08T12-10-58_248Z.thumb.png.505f6d9bf94299961f52eebd9e4df25d.png.dbe43f389117335ee2d54818ddb6ce0f.png

Edited by atim520

  • Author
17 hours ago, atim520 said:

swag 我的配置文件如下,供参考

# unraid
server {
    listen 443 ssl;
    #listen [::]:443;
    server_name unraid.*;

    include /config/nginx/ssl.conf;
    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app 192.168.3.4;
        set $upstream_port 80;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}

 

另外管理权限设置ssl使用为否,也就是通过http://192.168.3.4能实现内网访问,通过swag反向代理功能,实现外网与swag之间https连接,swag与unraid之间(内网)http连接。

356029286__2022-06-08T12-10-58_248Z.thumb.png.505f6d9bf94299961f52eebd9e4df25d.png.dbe43f389117335ee2d54818ddb6ce0f.png

感谢指教。参考了你的配置,外网用ddns访问还是不通

  • Author
1 hour ago, francishe said:

感谢指教。参考了你的配置,外网用ddns访问还是不通

把网络重新调整了,现在外网访问ddns出现“swag成功界面”,但访问unraid还是不行,也参考了你的配置文件。还是对swag用法不熟。

swag用法可以参考dock hub官方(https://hub.docker.com/r/linuxserver/swag)有详细使用说明,很详细

我的swag配置文件,我是使用aliyun而非duck,供参考

docker run -d \
  --network eNet #我的私人网络eNet\
  --name=swag \
  --cap-add=NET_ADMIN \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Asia/Shanghai \
  -e URL=填你的一级域名,就是www.后面的域名(不包含www) \
  -e VALIDATION=dns \
  -e SUBDOMAINS=wildcard \
  -e CERTPROVIDER= `#optional` \
  -e DNSPLUGIN=aliyun `#optional` \
  -e PROPAGATION= `#optional` \
  -e DUCKDNSTOKEN= `#optional` \
  -e EMAIL=填你的邮箱 `#optional` \
  -e ONLY_SUBDOMAINS=false `#optional` \
  -e EXTRA_DOMAINS= `#optional` \
  -e STAGING=false `#optional` \
  -p 8443:443 \
  -p 8080:80 `#optional` \
  -v /opt/docker/swag/config:/config \
  --restart unless-stopped \
  lscr.io/linuxserver/swag:latest

 

另外修改/config/dns-conf 文件夹下面的aliyun配置文件key和key_secret,key和key_secret是可以在阿里网站免费申请的。

然后在阿里设置二级域名,比如unraid.你的域名,就可以访问了。

Edited by atim520

  • Author

非常感谢您的耐心指教,无奈本人愚钝。用duckdns,始终停在“swag成功”界面,我甚至直接用你的反代配置文件,修改为我的server name和server ip,还是到不了unraid界面。改用cloudflare dns验证,二级域名cname到ddns,结果一样,外网停在“swag成功”界面,但内网用域名访问,返回的是10.0.0.253 ros的界面,而unraid的ip是254(在config中已指定set $upstream_app 10.0.0.254;)

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.