http 301 gets redirected to wrong port
I run a nginx site (nextcloud) on localhost port 53485 and used an http tunnel to forward it to cloud.nando.digital. I have to redirect certain links to other links with an http 301. The problem: The redirected link is on the port of the localhost (53485) and not the http(s) port (80/443). My nginx code:
location = /.well-known/carddav { return 301 /nextcloud/remote.php/dav/; }
location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; }
Expected Behavior: I open cloud.nando.digital/.well-known/carddav and get redirected to cloud.nando.digital/nextcloud/remote.php/dav/
Actual Behaviour: I open cloud.nando.digital/.well-known/carddav and get redirected to cloud.nando.digital:53485/nextcloud/remote.php/dav/ (Which doesn’t exist)
Post Information
Subscribe to post
Get notified by email when there are changes.
Upvoters
Post Details