[GH-ISSUE #3175] Ability to change ssl port #2151

Closed
opened 2026-02-26 07:34:14 +03:00 by kerem · 4 comments
Owner

Originally created by @pietru2004 on GitHub (Sep 2, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3175

Is your feature request related to a problem? Please describe.
Router in my house uses 443 (https default port for panel access) and nextcloud suggests turning on HSTS.

Describe the solution you'd like
I want to ask for availability to set ssl redirect port for paths... so if for example http is on 80 and https is on 444 it would send to https://domain:444 instead of https://domain:443 (Browsers by default redirect to the 443 if no port is specified)

Describe alternatives you've considered
Changing router configuration.. and it is not possible - router managed by my dad.

Originally created by @pietru2004 on GitHub (Sep 2, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3175 **Is your feature request related to a problem? Please describe.** Router in my house uses 443 (https default port for panel access) and nextcloud suggests turning on HSTS. **Describe the solution you'd like** I want to ask for availability to set ssl redirect port for paths... so if for example http is on 80 and https is on 444 it would send to https://domain:444 instead of https://domain:443 (Browsers by default redirect to the 443 if no port is specified) **Describe alternatives you've considered** Changing router configuration.. and it is not possible - router managed by my dad.
kerem 2026-02-26 07:34:14 +03:00
Author
Owner

@edsonsbj commented on GitHub (Oct 9, 2023):

Sua solicitação de recurso está relacionada a um problema? Por favor, descreva. O roteador na minha casa usa 443 (porta padrão https para acesso ao painel) e o nextcloud sugere ativar o HSTS.

Descreva a solução que você gostaria de pedir disponibilidade para definir a porta de redirecionamento ssl para caminhos... então se, por exemplo, http está em 80 e https está em 444 ele enviaria para https://domain:444 em vez de https://domain:443 (Navegadores por padrão redirecionam para o 443 se nenhuma porta for especificada)

Descreva as alternativas que você considerou Alterando a configuração do roteador.. e não é possível - roteador gerenciado pelo meu pai.

To be able to run https on ports other than 80 and 443 without error, you need to follow the steps below:

1 >> Stop Nginx Container

2 >> Edit docker-compose.yml change the port 443 to 444, only the one on the left and on the right remains the same.
Example

    ports:
      - '8880:80'
      - '81:81'
      - '444:443'

3 >> Start Nginx Again

4 >> Access the website as follows https://mydomain.com:444.

Another point I saw in your problem is that you configured the host for Nextcloud, so you need to make sure that your settings are similar to this
Captura de tela_2023-10-08_23-50-50 1
Define Location = /.well-known/caldav
Forward Hostname / IP* = your ip 192.168.x.x/remote.php/dav/
Captura de tela_2023-10-08_23-48-53
Define Location = /.well-known/carddav
Forward Hostname / IP* = your ip 192.168.x.x/remote.php/dav/
Captura de tela_2023-10-08_23-50-00
Define Location = /.well-known/webfinger
Forward Hostname / IP* = your ip 192.168.x.x/index.php/.well-known/webfinger
Captura de tela_2023-10-08_23-50-23
Define Location = /.well-known/nodeinfo
Forward Hostname / IP* = your ip 192.168.x.x/index.php/.well-known/nodeinfo
Captura de tela_2023-10-08_23-51-13 1

Then add these entries to Nextcloud config.php

  'overwritehost' => 'your.domain.com:444',
  'overwriteprotocol' => 'https',
<!-- gh-comment-id:1752294589 --> @edsonsbj commented on GitHub (Oct 9, 2023): > **Sua solicitação de recurso está relacionada a um problema? Por favor, descreva.** O roteador na minha casa usa 443 (porta padrão https para acesso ao painel) e o nextcloud sugere ativar o HSTS. > > **Descreva a solução que você gostaria** de pedir disponibilidade para definir a porta de redirecionamento ssl para caminhos... então se, por exemplo, http está em 80 e https está em 444 ele enviaria para https://domain:444 em vez de https://domain:443 (Navegadores por padrão redirecionam para o 443 se nenhuma porta for especificada) > > **Descreva as alternativas que você considerou** Alterando a configuração do roteador.. e não é possível - roteador gerenciado pelo meu pai. To be able to run https on ports other than 80 and 443 without error, you need to follow the steps below: 1 >> Stop Nginx Container 2 >> Edit docker-compose.yml change the port 443 to 444, only the one on the left and on the right remains the same. Example ``` ports: - '8880:80' - '81:81' - '444:443' ``` 3 >> Start Nginx Again 4 >> Access the website as follows https://mydomain.com:444. Another point I saw in your problem is that you configured the host for Nextcloud, so you need to make sure that your settings are similar to this ![Captura de tela_2023-10-08_23-50-50 1](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/60072822/c95735c3-7c88-417a-a910-85f02742f41d) Define Location = /.well-known/caldav Forward Hostname / IP* = your ip 192.168.x.x/remote.php/dav/ ![Captura de tela_2023-10-08_23-48-53](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/60072822/eed98f77-6357-4652-800c-ff24ece9ac25) Define Location = /.well-known/carddav Forward Hostname / IP* = your ip 192.168.x.x/remote.php/dav/ ![Captura de tela_2023-10-08_23-50-00](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/60072822/b6c10b49-8c4f-4700-986d-d9e1a39753a0) Define Location = /.well-known/webfinger Forward Hostname / IP* = your ip 192.168.x.x/index.php/.well-known/webfinger ![Captura de tela_2023-10-08_23-50-23](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/60072822/c17dcfae-7386-44d7-8f60-65e51d96aa56) Define Location = /.well-known/nodeinfo Forward Hostname / IP* = your ip 192.168.x.x/index.php/.well-known/nodeinfo ![Captura de tela_2023-10-08_23-51-13 1](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/60072822/0142197a-a2a8-464d-a446-91c8704fbd45) Then add these entries to Nextcloud config.php ``` 'overwritehost' => 'your.domain.com:444', 'overwriteprotocol' => 'https', ```
Author
Owner

@pietru2004 commented on GitHub (Oct 9, 2023):

I found that there is config for setting port override in nextcloud and after adding it, It seems it works now.
Also for https redirect to be for port 444 I needed to rebind rule directory of nginx proxy manager and set it to my custom path...

<!-- gh-comment-id:1752372247 --> @pietru2004 commented on GitHub (Oct 9, 2023): I found that there is config for setting port override in nextcloud and after adding it, It seems it works now. Also for https redirect to be for port 444 I needed to rebind rule directory of nginx proxy manager and set it to my custom path...
Author
Owner

@github-actions[bot] commented on GitHub (Jun 1, 2024):

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

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

@github-actions[bot] commented on GitHub (Jun 4, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2938088755 --> @github-actions[bot] commented on GitHub (Jun 4, 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#2151
No description provided.