[Support] Linuxserver.io - SWAG - Secure Web Application Gateway (Nginx/PHP/Certbot/Fail2ban)


Recommended Posts

I'm looking for a way to limit bandwidth based on IP (NOT on a per connection basis). I want to allow multiple connections from a single IP, but the total bandwidth per ip to have a specified limit.

 

I found a simple module that does this here, but it seems super old (but there are some newer pull requests for it that convert it to a dynamic module, and some that fix bugs): https://github.com/bigplum/Nginx-limit-traffic-rate-module

 

Is there a way to install new modules? Or another way to accomplish this goal?

Edited by Crash
mentioning the active pull requests on limit-traffic-rate module
Link to comment
26 minutes ago, Crash said:

I'm looking for a way to limit bandwidth based on IP (NOT on a per connection basis). I want to allow multiple connections from a single IP, but the total bandwidth per ip to have a specified limit.

 

I found a simple module that does this here, but it seems super old (but there are some newer pull requests for it that convert it to a dynamic module, and some that fix bugs): https://github.com/bigplum/Nginx-limit-traffic-rate-module

 

Is there a way to install new modules? Or another way to accomplish this goal?

No, nginx would have to be compiled with it

Link to comment

Hello,

I migrated to Swag a while ago with no issues at all. Today there was an update to swag that failed. Once I rebooted my server, the gui didn't start.

I booted into safemode with gui without plugins and was able to start the array.

I continued working on the system and found that If I stopped swag, the system started and gui loaded.I copied my settings removed swag, rebooted and the gui loaded. I then reinstalled swag and rebooted and the gui didn't load. I open a terminal and type docker stop swag and within seconds the gui loads.

If I restart swag all of my reverser proxies work perfectly.

I am completely lost.

 

Here is my latest diag

 

Thanks 

Chas

tower-diagnostics-20201028-1552.zip

Link to comment
1 hour ago, tdunks said:

Both letsencrypt and Organizr updated today and one of which broke the organizr auth included in letsencrypt (SWAG). It just gives a 500 error now on any page that has auth enabled. Does anyone have a potential fix?

Of you haven't done any changes to the following files, nginx.conf, proxy.conf, and ssl.conf, then try to delete them and restart swag.

If that doesn't fix it, it might be organizr.

Link to comment
7 hours ago, tdunks said:

Both letsencrypt and Organizr updated today and one of which broke the organizr auth included in letsencrypt (SWAG). It just gives a 500 error now on any page that has auth enabled. Does anyone have a potential fix?

Probably the links to the API. How do you use it?

There should be an include to:

/config/nginx/proxy-confs/organizr-auth.subfolder.conf;

and make sure the proxy_pass points to /api/v2/auth?group=$1

 

That fixed it for me

 

Link to comment
4 hours ago, Tuumke said:

Probably the links to the API. How do you use it?

There should be an include to:

/config/nginx/proxy-confs/organizr-auth.subfolder.conf;

and make sure the proxy_pass points to /api/v2/auth?group=$1

 

That fixed it for me

 

Could you share you full contents of that file? I'm having this issue and I feel like I've made the appropriate api reference updates, but it's not working.

 

The Organizr docs mention making sure you include this block somewhere:

location /api/v2 {
	try_files $uri /api/v2/index.php$is_args$args;
}

Where does that go?

Link to comment
22 hours ago, mudsloth said:

Could you share you full contents of that file? I'm having this issue and I feel like I've made the appropriate api reference updates, but it's not working.

 

The Organizr docs mention making sure you include this block somewhere:


location /api/v2 {
	try_files $uri /api/v2/index.php$is_args$args;
}

Where does that go?

There is a proxy conf named organizr-auth you can use instead of adding it to your proxy-conf.

Link to comment

hey. I need direkt http downloads for my gameserver (maps etc..) in the past i used nginx for that and it worked fine. How can i realise it with swag. I want to mount the game folder someware to the swag container and i want to direkt access files from "domain.org/ut3"  how is that possible. I use subfolders btw

Link to comment
32 minutes ago, Gee1 said:

hey. I need direkt http downloads for my gameserver (maps etc..) in the past i used nginx for that and it worked fine. How can i realise it with swag. I want to mount the game folder someware to the swag container and i want to direkt access files from "domain.org/ut3"  how is that possible. I use subfolders btw

Swag is using nginx.

Link to comment

Hi.

Dunno what happen, but suddenly all of my customized config files has disappeared and the container is starting up with vanilla config files.

I do have a backup so I can recover, but how can I find the root cause of this?

Haven't done anything besides checking for container updates...

 

Thanks

Link to comment
14 hours ago, gshlomi said:

Hi.

Dunno what happen, but suddenly all of my customized config files has disappeared and the container is starting up with vanilla config files.

I do have a backup so I can recover, but how can I find the root cause of this?

Haven't done anything besides checking for container updates...

 

Thanks

You might have changed the appdata share to not be on the cache drive anymore and the mover moved it to the array. And your appdata path for swag is using /mnt/cache

Link to comment
2 hours ago, gshlomi said:


Unfortunately no, it was the first thing I’ve checked...


Sent from my iPhone using Tapatalk

Then you or someone deleted your appdata.

But this is really impossible for us to know as we have no info from you about what you have done to your server lately.

Link to comment
On 10/30/2020 at 6:32 PM, mudsloth said:

Could you share you full contents of that file? I'm having this issue and I feel like I've made the appropriate api reference updates, but it's not working.

 

The Organizr docs mention making sure you include this block somewhere:


location /api/v2 {
	try_files $uri /api/v2/index.php$is_args$args;
}

Where does that go?

There should be 2 parts, 1 for the server block, the other in location block

i got
config/nginx/auth.conf which has:
 

include /config/nginx/proxy-confs/organizr-auth.subfolder.conf;
auth_request /auth-0;

and a file called auth-location.conf (but on my external VPS instead of same host) in same folder
 

location ~ ^/auth-(.*) {
    resolver 127.0.0.11 valid=30s;
    set $upstream_app organizrv2;
    set $upstream_port 5076;
    set $upstream_proto http;
    proxy_pass $upstream_proto://$upstream_app:$upstream_port/api/v2/auth&group=$1;
    proxy_pass_request_body off;
    proxy_set_header Content-Length "";
}

Then this is my nzbhydra.subdomain.conf looks like this:

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

    server_name nzbhydra.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    include /config/nginx/auth-location.conf;

    location / {
        include /config/nginx/auth.conf;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app nzbhydra2;
        set $upstream_port 5076;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }

    location ~ (/nzbhydra)?/api {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app nzbhydra2;
        set $upstream_port 5076;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }

    location ~ (/nzbhydra)?/getnzb {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app nzbhydra2;
        set $upstream_port 5076;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }

    location ~ (/nzbhydra)?/gettorrent {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app nzbhydra2;
        set $upstream_port 5076;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }

    location ~ (/nzbhydra)?/rss {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app nzbhydra2;
        set $upstream_port 5076;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }

    location ~ (/nzbhydra)?/torznab/api {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app nzbhydra2;
        set $upstream_port 5076;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }
}


 

Edited by Tuumke
Link to comment

Hello,

 

I updated from Lersencyipt to swag and has been working well for quite a while for some reason i wanted to do a fresh install.

I removed the swag docker and  used CA remove and completely removed it before i installed the new one.

After install the docker is not in the list but it is in the appdata folder.

any ideas how to get it to show up? I have tried a restart with no luck. also if i try to reinstall it all it does is let me edit the config.

 

*Update - It also auto boots and looks to be running but cannot see it in the running docker apps.

 

*Udate - Feel like a jackass - After Clean install it pulled the Letsencrypt picture not the Swag pic. Updated the name and everything was working as expected.

 

Edited by Soulflyzz
Link to comment
1 hour ago, Soulflyzz said:

Hello,

 

I updated from Lersencyipt to swag and has been working well for quite a while for some reason i wanted to do a fresh install.

I removed the swag docker and  used CA remove and completely removed it before i installed the new one.

After install the docker is not in the list but it is in the appdata folder.

any ideas how to get it to show up? I have tried a restart with no luck. also if i try to reinstall it all it does is let me edit the config.

 

*Update - It also auto boots and looks to be running but cannot see it in the running docker apps.

 

That's a question for unraid and/or CA

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.