[GH-ISSUE #109] Force HTTPS #3168

Closed
opened 2026-02-28 11:54:51 +03:00 by kerem · 4 comments
Owner

Originally created by @Germwalker on GitHub (Apr 28, 2023).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/109

Hello,

Can you force the HTTPS redirection like the certbot --nginx plugin ?
It's more safe than the current implementation.

Like appending this to the conf file :

server {
    if ($host = example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    server_name example.com;
    listen 80;
    return 404; # managed by Certbot
}

Maybe it could be a button to force the HTTPS redirection ?

Originally created by @Germwalker on GitHub (Apr 28, 2023). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/109 Hello, Can you force the HTTPS redirection like the _certbot --nginx_ plugin ? It's more safe than the current implementation. Like appending this to the conf file : ``` server { if ($host = example.com) { return 301 https://$host$request_uri; } # managed by Certbot server_name example.com; listen 80; return 404; # managed by Certbot } ``` Maybe it could be a button to force the HTTPS redirection ?
kerem 2026-02-28 11:54:51 +03:00
Author
Owner

@0xJacky commented on GitHub (Apr 29, 2023):

I am sorry that we cannot implement this feature, I had explained the reason why we cannot do this in issue #100.

<!-- gh-comment-id:1528648323 --> @0xJacky commented on GitHub (Apr 29, 2023): I am sorry that we cannot implement this feature, I had explained the reason why we cannot do this in issue #100.
Author
Owner

@Germwalker commented on GitHub (Apr 29, 2023):

I understand the problem you faced with this snippet added by certbot by reading #100.

But I only gave this code as an example of the forced http to https redirection, I have no interest in using certbot if nginx-ui can deal with certificates and auto renew on it's own.

What do you think about the 80 to 443 forced redirection ?

<!-- gh-comment-id:1528799742 --> @Germwalker commented on GitHub (Apr 29, 2023): I understand the problem you faced with this snippet added by certbot by reading #100. But I only gave this code as an example of the forced http to https redirection, I have no interest in using certbot if nginx-ui can deal with certificates and auto renew on it's own. What do you think about the 80 to 443 forced redirection ?
Author
Owner

@0xJacky commented on GitHub (Apr 29, 2023):

Sorry, I misunderstood. We will modify the current template as soon as possible.

<!-- gh-comment-id:1528803316 --> @0xJacky commented on GitHub (Apr 29, 2023): Sorry, I misunderstood. We will modify the current template as soon as possible.
Author
Owner

@0xJacky commented on GitHub (Apr 29, 2023):

Added in c2a3cb6, and maybe we will make it as a button in v2.0, thanks for your sugguestion.

<!-- gh-comment-id:1528808486 --> @0xJacky commented on GitHub (Apr 29, 2023): Added in c2a3cb6, and maybe we will make it as a button in v2.0, thanks for your sugguestion.
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-ui#3168
No description provided.