Closed
Description
- Gitea version (or commit ref): 1.6.0-rc2
- Operating system: Linux / macOS
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
Description
Let's Encrypt support was merged in #4189 and ships in 1.6.0-rc1. Has anyone been able to make this work? Reading the code (
Line 83 in 3d84f1f
PORT_TO_REDIRECT
from the config file is supposed to be used to redirect HTTP to HTTPS and also by Let's Encrypt to generate certificates. However I'm only getting a daemon running on the HTTP_PORT
(using TLS). When ENABLE_LETSENCRYPT
is set to false
and REDIRECT_OTHER_PORT
is set to true
a daemon listens on PORT_TO_REDIRECT
and redirects HTTP to HTTPS. I can reproduce the issue running the 1.6.0-rc2 binary directly on macOS, as well as in Kubernetes/Docker.
Update: Setting PORT_TO_REDIRECT
or not leads to the same result, only listening on HTTPS
Here are the relevant parts of my config:
...
[server]
PROTOCOL = https
HTTP_PORT = 3000
DOMAIN = gitea.example.com
PORT_TO_REDIRECT = 3001
ENABLE_LETSENCRYPT = true
LETSENCRYPT_ACCEPTTOS = true
LETSENCRYPT_DIRECTORY = https
LETSENCRYPT_EMAIL = [email protected]
Am I missing something? I have checked the code, as well as read https://docs.gitea.io/en-us/https-setup/