mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 09:55:51 +03:00
[GH-ISSUE #1791] Redirection does not work with active Cloudflare proxy #1325
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @talesam on GitHub (Jan 22, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1791
Domain redirect does not work if I enable proxy on Cloudflare, does anyone know what this could be?, When I disable proxy for www (CNAME) on cloudflare, the redirect stops working.



@whytf commented on GitHub (Jan 24, 2022):
From what you say, it doesn't work when you disable cloudflare proxy.
First of all when cloudflare proxy is disabled it only works as a regular dns and there's something wrong with your configuration .
Second, you can achieve the same result just by creating a single proxy host while specifying both domain at same time or separately, does not matter, like here:

@talesam commented on GitHub (Jan 24, 2022):
This does not work, the domain that has www it will say that it does not have SSL active.

@whytf commented on GitHub (Jan 24, 2022):
Did you setup the SSL tab ?
@talesam commented on GitHub (Jan 24, 2022):
Yes of course it works for domain without www
https://veidahavan.com/
@whytf commented on GitHub (Jan 24, 2022):
Your certificate is not wildcard, thus not working on subdomains and also the www is invalid because it is generated for localhost and signed by localhost.
https://www.ssllabs.com/ssltest/analyze.html?d=www.veidahavan.com
Here google for example has *.google in alternative names so it does work for subdomains as www.
https://www.ssllabs.com/ssltest/analyze.html?d=google.sk&s=142.250.191.67&latest
@talesam commented on GitHub (Jan 24, 2022):
Got it, I'll test it, I have to generate a certificate with *.veidahavan.com
@talesam commented on GitHub (Feb 4, 2022):
I couldn't generate a domain with valid www, do you have any documentation that explains how to do it?
I tried to generate with the wildcard * but it gave an error.
@fabriziosalmi commented on GitHub (Feb 7, 2022):
Since You've a Cloudflare account just put that redirect in the Cloudflare's bulk redirects section.
For any Cloudflare + NginxProxyManager user I suggest to enable Cloudflare proxy even if You're using nginx proxy manager. This because it just works and that way You can set Cloudflare SSL/TLS mode to strict instead of full since You've a valid certificate on the nginx proxy layer too and not just on the publc endpoint managed by Cloudflare. Of course real ip stuff need to be correctly forwarded to the app servers (it's the latest entry in the x-forwarded-for header or is the value of CF-connecting-IP header provided by Cloudflare).
@talesam commented on GitHub (Feb 7, 2022):
I've tried several times to use the CF certificate and I could never get it to work in NPM :-(
@fabriziosalmi commented on GitHub (Feb 7, 2022):
maybe you need to install cloudflare root certificate in the npm CA vault?
Il giorno lun 7 feb 2022 alle 14:01 Tales A. Mendonça <
@.***> ha scritto:
@github-actions[bot] commented on GitHub (Feb 26, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Apr 11, 2025):
Issue was closed due to inactivity.