Jump to content

I have trouble setting up swag as a proxy on unraid

Go to solution Solved by Reikasa_,

I managed to fix it by adding these two attached lines into the site config of swag under appdata/swag/nginx/site-configs/default

solution.PNG

Hello smart people,

 

I have unraid running on a server here. 
My plan is to have my instance of nextcloud accessible over http/https.
I have already setup a dyndns service, the necessary portforwarding and swag as a proxy to the point that I reach the swag startup page when I try to connect over my domain.
Now I struggle to forward that connection to my nextcloud instance... 
I tried following a few tutorials and I always think I edit all the necessary configs the right way, but I never managed to connect to nextcloud.
Sometimes I wouldn't be able to access nextcloud at all anymore and sometimes I couldn't access the swag page anymore because of a "502 bad gateway" error.


Any help is very much appreciated!

best regards

Link to comment
Share on other sites

Link to post
Share on other sites

On 6/28/2021 at 7:02 AM, Reikasa_ said:

Hello smart people,

 

I have unraid running on a server here. 
My plan is to have my instance of nextcloud accessible over http/https.
I have already setup a dyndns service, the necessary portforwarding and swag as a proxy to the point that I reach the swag startup page when I try to connect over my domain.
Now I struggle to forward that connection to my nextcloud instance... 
I tried following a few tutorials and I always think I edit all the necessary configs the right way, but I never managed to connect to nextcloud.
Sometimes I wouldn't be able to access nextcloud at all anymore and sometimes I couldn't access the swag page anymore because of a "502 bad gateway" error.


Any help is very much appreciated!

best regards

 

So the Swag docker already comes with an example config for Nextcloud. 

Have you connected to the docker and gone to /config/nginx/proxy-confs and found the existing sample config?

You need to rename it from nextcloud.<domain>.conf.sample to nextcloud.<domain>.conf for Swag/Nginx to read it. Also check the variables are correct in the config. 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 6/29/2021 at 6:49 AM, Jarsky said:

 

So the Swag docker already comes with an example config for Nextcloud. 

Have you connected to the docker and gone to /config/nginx/proxy-confs and found the existing sample config?

You need to rename it from nextcloud.<domain>.conf.sample to nextcloud.<domain>.conf for Swag/Nginx to read it. Also check the variables are correct in the config. 

Yes I did try using that file.
I tried both renaming it as nextcloud.<insert my domain name>.conf and just nextcloud.subdomain.conf.
Of course I also edited the content according to tutorials I found online.
But I still only get to the swag config site that tells me I should set it up properly.

I'll attach the config file of swag.
I did not yet edit the nextcloud config, but from what I understand that should only matter for logging in, I should still get further than swag if it is properly setup.

nextcloud_config.PNG

Link to comment
Share on other sites

Link to post
Share on other sites

I managed to fix it by adding these two attached lines into the site config of swag under appdata/swag/nginx/site-configs/default

solution.PNG

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, Reikasa_ said:

I managed to fix it by adding these two attached lines into the site config of swag under appdata/swag/nginx/site-configs/default

solution.PNG

 

Nice work 👍

I was going to point out that that nextcloud.conf points to an internal name of https://nextcloud in Swag, so there must be another proxy_pass configuration in a default/global config for configuring the actual hostname/ip 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...
On 6/30/2021 at 10:11 AM, Reikasa_ said:

I managed to fix it by adding these two attached lines into the site config of swag under appdata/swag/nginx/site-configs/default

solution.PNG

What does the IP 192.168.178.47 reference for I have tried this with both the IP of the SWAG docker container and the Unraid server and it just stops working completely instead of the 502 error.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×