[GH-ISSUE #63] Redirect Issue #60

Closed
opened 2026-02-26 05:33:59 +03:00 by kerem · 12 comments
Owner

Originally created by @GeneralLuzi on GitHub (Feb 2, 2019).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/63

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!

Originally created by @GeneralLuzi on GitHub (Feb 2, 2019). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/63 Hi, the following szenario I would like to achive: All of the following should point to the same URL https://www.subdomain.domain.tld: - https://www.subdomain.domain.tld - http://www.subdomain.domain.tld - https://subdomain.domain.tld - http://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!
kerem 2026-02-26 05:33:59 +03:00
Author
Owner

@GeneralLuzi commented on GitHub (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.

<!-- gh-comment-id:459965773 --> @GeneralLuzi commented on GitHub (Feb 2, 2019): update: the relevant conf within redirection_host folder has the following specified: - return 301 $scheme://https://www.subdomain.domain.tld$request_uri; 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.
Author
Owner

@jc21 commented on GitHub (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.

<!-- gh-comment-id:464536661 --> @jc21 commented on GitHub (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.
Author
Owner

@mackcoding commented on GitHub (Feb 23, 2019):

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.

<!-- gh-comment-id:466619677 --> @mackcoding commented on GitHub (Feb 23, 2019): 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.
Author
Owner

@jc21 commented on GitHub (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
<!-- gh-comment-id:466834915 --> @jc21 commented on GitHub (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
Author
Owner

@toupou commented on GitHub (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

<!-- gh-comment-id:778033138 --> @toupou commented on GitHub (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](https://user-images.githubusercontent.com/36747376/107741807-2739c800-6d0e-11eb-89eb-41956663c9dc.png) ![Bildschirmfoto 2021-02-12 um 08 40 24](https://user-images.githubusercontent.com/36747376/107741810-29038b80-6d0e-11eb-9687-e82bc0a397bf.png)
Author
Owner

@chaptergy commented on GitHub (May 10, 2021):

Shortly after your comment PR https://github.com/jc21/nginx-proxy-manager/pull/883 was merged. I'm assuming this fixed the issue. If it did not, let me know and I can reopen the issue.

<!-- gh-comment-id:837285170 --> @chaptergy commented on GitHub (May 10, 2021): Shortly after your comment PR https://github.com/jc21/nginx-proxy-manager/pull/883 was merged. I'm assuming this fixed the issue. If it did not, let me know and I can reopen the issue.
Author
Owner

@rockpham commented on GitHub (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

<!-- gh-comment-id:1372188539 --> @rockpham commented on GitHub (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](https://user-images.githubusercontent.com/6811407/210786211-f003c536-a57a-48d2-8f25-1efe28b20048.png) ![CleanShot 2023-0105 at 19 55 48@2x](https://user-images.githubusercontent.com/6811407/210786236-86629714-c5af-4685-994e-79d6f18156c9.png) ![CleanShot 2023-0105 at 19 57 01@2x](https://user-images.githubusercontent.com/6811407/210786246-42b4980e-a3f8-437c-8fea-75d7068b1a0f.png)
Author
Owner

@Cruv commented on GitHub (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.

<!-- gh-comment-id:1409365192 --> @Cruv commented on GitHub (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.
Author
Owner

@rockpham commented on GitHub (Feb 22, 2023):

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

ảnh
<!-- gh-comment-id:1439671743 --> @rockpham commented on GitHub (Feb 22, 2023): I got the redirection host working by using 301, instead of 308 <img width="491" alt="ảnh" src="https://user-images.githubusercontent.com/6811407/220574755-982fa1fc-fc00-4114-a18b-fa992d28450e.png">
Author
Owner

@Barina commented on GitHub (Jul 29, 2024):

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

<!-- gh-comment-id:2256114002 --> @Barina commented on GitHub (Jul 29, 2024): Issue still persist in v2.11.3 using 308 still getting double https:// on a redirection host.
Author
Owner

@BaconFist commented on GitHub (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)
<!-- gh-comment-id:2423349483 --> @BaconFist commented on GitHub (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)
Author
Owner

@Chaxiraxi commented on GitHub (Oct 27, 2024):

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

<!-- gh-comment-id:2440177740 --> @Chaxiraxi commented on GitHub (Oct 27, 2024): As discussed in [this issue](https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3950), I think this is not possible with Nginx Proxy Manager. See [this reddit post](https://www.reddit.com/r/nginxproxymanager/comments/pnec6x/comment/henl8vx/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#60
No description provided.