I installed SWAG in my unRAID server, using SpaceInvader One’s guides, although there is no “pure” guide for SWAG.
Anyway I tried to follow it as much as I could, by my MAIN usage is not to use it to reverse proxy to other containers, but also use it to reach other servers in VMs I have on unRAID.
Some info about my setup:
- unRAID on a server (duh!).
- NethServer on a VM.
- I have my own domain (the host uses cpanel)… let’s call it my.domain.
- Technitium DNS on a container, but using “br0” network type (seems to work ok like that), I use that as DNS for my internal network. My internal domain is in the form local.my.domain.
- My router supports only certain ddns providers, but I have it set properly.
- I have properly set in cpanel to resolve (cname) to ddns (this works fine, way before I installed SWAG).
- I defined a custom container network for SWAG, although I haven’t used it on another container yet.
So…
First, the SECONDARY thing I want to point out (not the actual reason I post):
When I changed the container to validate using dns, cpanel, I came across two issues:
-
I couldn’t edit /appdata/swag/dns-conf/cpanel.ini (to put my proper cpanel credentials) from anything else than open a terminal to my unRAID server and edit it from there. Are the security settings correct?
(whereas proxy-confs is editable from a computer in my LAN) -
When SWAG booted, it warned me “Plugin legacy name certbot-dns-cpanel:cpanel may be removed in a future version. Please use cpanel instead.”
…what is that and how do I fix it?
Anyway, even with the above minor issues, the above works, here comes my main issue:
My first use as I said, is to use SWAG to reach WebTop mail on my NethServer.
As is set by NethServer, WebTop is reachable internally (and was also externally before using SWAG), with:
https:// remote.my.domain/webtop and https:// mynethserver.local.my.domain/webtop
To move to SWAG, I added a cname entry for this in my cpanel (external) DNS, let say “mymail.my.domain”.
I edited webtop.subdomain.conf and the two entries I touched were:
server_name mymail.*;
and
proxy_pass https:// mynethserver.local.my.domain/webtop
(the above normally takes me to WebTop properly.
When I did that and tried to access WebTop from an outside device, it failed and said it couldn’t find /webtopwebtop!
So, first thing I realized was that “something” added webtop in the URL anyway!
- First (actually #3 in this post) question is WHAT adds “webtop” word on the URL?
After I saw this, I eliminated from webtop.subdomain.conf the “/webtop” from proxy_pass.
This time, it reached WebTop login screen properly!
(and I saw it translated it to https:// mymail.my.domain/webtop)
And here is the main issue
When I tried to login though… it failed because it switched to URL “https:// 127.0.0.1/webtop”!
-
Why the heck did it switch to loopback???
So, resolving this issue is the main reason I post this. -
Bonus question: Since I have an internal DNS, is there any point using it in SWAG?
Thank you for your time!
(all spaces in URL is to get by the limitation of new users in this server)