[GH-ISSUE #1214] wildcard redirect http to https #990

Closed
opened 2026-02-26 06:35:20 +03:00 by kerem · 9 comments
Owner

Originally created by @AznRaven on GitHub (Jul 1, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1214

Feature Request

I have a synology nas that will handle all the ssl certs. but it's not redirecting http to https

Is NPM able to redirect all http traffic to https? Right now, I'm redirecting 1 source to 1 destination in the Redirection Hosts and it works.

http --> a.domain.com --> 301 --> https --> a.domain.com
http --> b.domain.com --> 301 --> https --> b.domain.com

But what I want is a single redirect command that will redirect all
http --> *.domain.com --> 301 --> https --> *.domain

Is your feature request related to a problem? Please describe.
When you have 10-20 dockers that need http to https redirection. it can be a pain doing it 1 by 1 for each redirect.

Describe the solution you'd like
A wildcard redirect would be awesome. 1 redirect command to redirect all http traffic to https.

Describe alternatives you've considered
I've thought about using the regular nginx and changing the block code.

server {
	listen 80 default_server;
	listen [::]:80 default_server;
	server_name _;
	return 301 https://$host$request_uri;
}

But I prefer the Nginx Proxy Manager GUI.

Additional context
Maybe if you allow block code in Nginx Proxy Manager for advanced users. That would solve a lot of problems.
Being able to edit server blocks will help more advanced users to fine tune their setup.

Originally created by @AznRaven on GitHub (Jul 1, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1214 Feature Request I have a synology nas that will handle all the ssl certs. but it's not redirecting http to https Is NPM able to redirect all http traffic to https? Right now, I'm redirecting 1 source to 1 destination in the Redirection Hosts and it works. ``` http --> a.domain.com --> 301 --> https --> a.domain.com http --> b.domain.com --> 301 --> https --> b.domain.com ``` But what I want is a single redirect command that will redirect all `http --> *.domain.com --> 301 --> https --> *.domain` **Is your feature request related to a problem? Please describe.** When you have 10-20 dockers that need http to https redirection. it can be a pain doing it 1 by 1 for each redirect. **Describe the solution you'd like** A wildcard redirect would be awesome. 1 redirect command to redirect all http traffic to https. **Describe alternatives you've considered** I've thought about using the regular nginx and changing the block code. ``` server { listen 80 default_server; listen [::]:80 default_server; server_name _; return 301 https://$host$request_uri; } ``` But I prefer the Nginx Proxy Manager GUI. **Additional context** Maybe if you allow block code in Nginx Proxy Manager for advanced users. That would solve a lot of problems. Being able to edit server blocks will help more advanced users to fine tune their setup.
kerem 2026-02-26 06:35:20 +03:00
Author
Owner

@mrfy commented on GitHub (Jan 14, 2022):

Hi @AznRaven , how did you redirect it from NPM? image
Thanks

<!-- gh-comment-id:1013197618 --> @mrfy commented on GitHub (Jan 14, 2022): Hi @AznRaven , how did you redirect it from NPM? ![image](https://user-images.githubusercontent.com/22953614/149535825-8514d39c-2009-4b13-b8e6-c373fbb64238.png) Thanks
Author
Owner

@zierbeek commented on GitHub (Mar 4, 2022):

how should this be used? I'm having this issue with all of my services not getting automatically redirect to https

<!-- gh-comment-id:1059320046 --> @zierbeek commented on GitHub (Mar 4, 2022): how should this be used? I'm having this issue with all of my services not getting automatically redirect to https
Author
Owner

@srvoets commented on GitHub (Mar 11, 2022):

how should this be used? I'm having this issue with all of my services not getting automatically redirect to https

same

<!-- gh-comment-id:1065546632 --> @srvoets commented on GitHub (Mar 11, 2022): > how should this be used? I'm having this issue with all of my services not getting automatically redirect to https same
Author
Owner

@tingjie02 commented on GitHub (Apr 5, 2022):

just tick Force SSL

<!-- gh-comment-id:1088268550 --> @tingjie02 commented on GitHub (Apr 5, 2022): just tick Force SSL
Author
Owner

@plusdove commented on GitHub (Oct 31, 2022):

tick Force SSL not work, how should this be used? I'm having this issue with all of my services not getting automatically redirect to https, always show 400 bad request

<!-- gh-comment-id:1296546515 --> @plusdove commented on GitHub (Oct 31, 2022): tick Force SSL not work, how should this be used? I'm having this issue with all of my services not getting automatically redirect to https, always show 400 bad request
Author
Owner

@tomlawesome commented on GitHub (Nov 7, 2022):

just tick Force SSL

This doesn't work. SSL is not in fact forced.

<!-- gh-comment-id:1306374252 --> @tomlawesome commented on GitHub (Nov 7, 2022): > just tick Force SSL This doesn't work. SSL is not in fact forced.
Author
Owner

@Qifcn commented on GitHub (Feb 10, 2023):

image
error_page 497 301 =307 https://$host:4443$request_uri;
注意空格 4443改成你 自己的端口
image

<!-- gh-comment-id:1425429828 --> @Qifcn commented on GitHub (Feb 10, 2023): ![image](https://user-images.githubusercontent.com/34029055/218045013-018e4d0b-b0c1-4a3f-8fcc-19a681e42717.png) ` error_page 497 301 =307 https://$host:4443$request_uri; ` 注意空格 4443改成你 自己的端口 ![image](https://user-images.githubusercontent.com/34029055/218045348-1bbda1de-5ef7-4035-82d8-2506d3540b66.png)
Author
Owner

@github-actions[bot] commented on GitHub (Mar 8, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1984906404 --> @github-actions[bot] commented on GitHub (Mar 8, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Apr 21, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2817492782 --> @github-actions[bot] commented on GitHub (Apr 21, 2025): Issue was closed due to inactivity.
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#990
No description provided.