Skip to content

Redirect Issue #63

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

Closed
GeneralLuzi opened this issue Feb 2, 2019 · 12 comments
Closed

Redirect Issue #63

GeneralLuzi opened this issue Feb 2, 2019 · 12 comments

Comments

@GeneralLuzi
Copy link

GeneralLuzi commented Feb 2, 2019

Hi,

the following szenario I would like to achive:
All of the following should point to the same URL https://www.subdomain.domain.tld:

1) Szenarios for Proxy Host:
1a) Szenario: https://www.subdomain.domain.tld --> create Reverse Proxy Host inkl. SSL
1b) Szenario: http://www.subdomain.domain.tld --> without ssl --> Update Reverse Proxy from 1a) to Force SSL

2) Szenario for Redirect Host
2a) Szenario: http://subdomain.domain.tld -->create Redirect Host (point to URL from 1a)
2b) Szenario: https://subdomain.domain.tld --> update Redirect Host from 2a) to SSL + Force SSL

Testing:
1a) works as specified
1b) works as specified
2a) does not work: url is redirected to https://http//subdomain.domain.tld
2b) does not work - like 2a)

If if I try to disable "Force SSL" within the Redirect Host but it does not save this new setting. (the same as specifed for http/2 in #61 --> perhaps there should be a new issue opened?!)

I deleted the Redirect Host from 2) and created the a new one with SSL settings, but without "Forced SSL". Same picture.

Can some verify my observation? Or do I missunderstand something how to use this manager?

Thanks a lot!

@GeneralLuzi GeneralLuzi changed the title Redirect Issue: forced ssl Redirect Issue Feb 2, 2019
@GeneralLuzi
Copy link
Author

GeneralLuzi commented Feb 2, 2019

update:
the relevant conf within redirection_host folder has the following specified:

This might cause this issue!

If I delete the scheme "https://" within my redirect, all desired things work. Perhaps it will be good to specify this somewhere in the GUI for other noobs like me ;)
Alternatively: replace https:// or http:// if it is present.

@jc21
Copy link
Member

jc21 commented Feb 18, 2019

Regarding the location https://http//subdomain.domain.tld, I just tested myself and couldn't replicate this outcome.

TL;DR for below: please try again with the latest docker image.

To simplify the setup required, you just want to

  1. create a Redirection Host to from source subdomain.domain.tld to destination www.subdomain.domain.tld
  2. create a Proxy Host from www.subdomain.domain.tld to upstream server.

When it comes to redirecting and SSL, when the destination http server supports both HTTP and HTTPS connections (as a Proxy Host does), your Redirection Host doesn't need to Force SSL because you'll want to leave that determination up to the destination. However if the destination server only supported HTTPS then you'd want to force SSL before it even got to the destination.

A redirection host will forward to the destination on the same protocol scheme requested, and if force SSL is on then it will redirect to that first.

Btw, when I say that the server supports HTTP and HTTPS I mean from an open port point of view, not from a Proxy Host configured to forward both point of view.

@mackcoding
Copy link

I am having this issue as well. I want to redirect to an https but I get https://http//url. The URL is an IP address that requires https.

@jc21
Copy link
Member

jc21 commented Feb 25, 2019

I'm going to need to see the configuration for these hosts.

  1. Screenshot the edit proxy host dialog, with the domain name removed for privacy
  2. Find the nginx configuration for that host in your data/nginx/proxy_host folder and attach that here, changing the domain name for privacy

@toupou
Copy link

toupou commented Feb 12, 2021

I still have the same issue. forwarding to another domain adds https//www.

happy to provide any config files if needed
Bildschirmfoto 2021-02-12 um 08 39 20
Bildschirmfoto 2021-02-12 um 08 40 24

@chaptergy
Copy link
Collaborator

Shortly after your comment PR #883 was merged. I'm assuming this fixed the issue. If it did not, let me know and I can reopen the issue.

@rockpham
Copy link

rockpham commented Jan 5, 2023

I am having this issue as well. I want to redirect to an https but I get https://http//url. The URL is an IP address that requires https.

I am also having this issue with redirection hosts. Attached are some screenshots, I hope that it's useful.
Please kindly help!

CleanShot 2023-0105 at 19 55 42@2x
CleanShot 2023-0105 at 19 55 48@2x
CleanShot 2023-0105 at 19 57 01@2x

@Cruv
Copy link

Cruv commented Jan 30, 2023

I know this is a zombie issue but I am also running into this with the same exact result as the poster above me.

@rockpham
Copy link

I got the redirection host working by using 301, instead of 308

ảnh

@Barina
Copy link

Barina commented Jul 29, 2024

Issue still persist in v2.11.3 using 308 still getting double https:// on a redirection host.

@BaconFist
Copy link

BaconFist commented Oct 18, 2024

I found a solution. It's not an Issue with nginx-proxy-manager.

The problem is, that a permanent redirect is cached a Webbrowser.

You can test it using curl and check the Location: header
curl -D - YOUR_URL

I recommend changing HTTP Code to 307 Temporary Redirect to prevent this.

  1. Open Dev Tools in your browser (F12)
  2. navigate to Network tab
  3. check disable cache
  4. try your redirect url again
  5. re-enable cache (if u want)

@Chaxiraxi
Copy link

As discussed in this issue, I think this is not possible with Nginx Proxy Manager. See this reddit post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants