-
-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Connection refused depending on external ports #506
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
SWAG/nginx is set up to serve/proxy at the domain, not IP |
Hello ! Here is the logical diagram of my understanding : Why, when locally consulting Moreover, when the external port of nextcloud is |
That's not an accurate diagram. Browser connecting to an IP is not the same thing as the packet getting forwarded to a different IP:port and they are not the same as SWAG reverse proxying a connection. Those are 3 different types of operation. But in a nutshell, when the browser checks the dns records and then attempts to connect to the IP, it sends the domain/url info in headers so nginx knows what to serve/proxy. When you attempt a direct connection to an IP, you are not sending those headers so nginx uses the default server block because it doesn't know what url you're requesting. In any case, you should read up on the reverse proxy basics as these questions are way out of scope in this issue. If you have further questions, you can ask in #other-support channel on our discord. Closing. |
Ok, thank you for answering, I am sorry having taken your time. I will check the doc and learn :) |
Is there an existing issue for this?
Current Behavior
My nextcloud website is:
mydomain.duckdns.org/nextcloud/
address regardless of the ports on my nextcloud docker192.168.1.59:nextcloud_external_port
(regardless of the ports values)From any of my other device, running on local network (smartphone, laptop), nextcloud website is:
192.168.1.59:10443/nextcloud
(swag docker ports are10443:443
) when my nextcloud docker ports are1443:443
. "Connection refused". However, interesting to notice that192.168.1.59:10443/nextcloud
request has been processed (at least partly) since another adress is returned :192.168.1.59:10443/nextcloud/login
:(sorry for french text). Moreover, using
curl -i
request seems to be honored without any issue even on my laptop.192.168.1.59:10443/nextcloud
(swag docker ports are10443:443
) when my nextcloud docker ports are443:443
From the server system: everything is accessible, regardless of the ports values
Since the problem is only happening through a SWAG reverse proxy local call, I suppose that I should post here.
Expected Behavior
local address + SWAG external port + nextcloud subfolder suffix should work :
Steps To Reproduce
With docker:
~/swag/config/nginx/proxy-confs/nextcloud.subfolder.conf.sample
--> remove .sample )~/nextcloud/config/www/nextcloud/config/config.php
as described in~/swag/config/nginx/proxy-confs/nextcloud.subfolder.conf
commentshttps://myserver.duckdns.org/nextcloud/
thenhttps://nas-ip-address:10443/nextcloud/
Environment
CPU architecture
x86-64
Docker creation
swag container yaml:
nextcloud container yaml:
Container logs
Output of
docker logs swag
:Output of
docker logs nextcloud
:The text was updated successfully, but these errors were encountered: