[doc] unclear guidance on the https server setup #6722

Closed
opened 2025-11-02 07:04:45 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @cdluminate on GitHub (Jan 19, 2021).

In the documentation (https://docs.gitea.io/en-us/https-setup/), it is said that the configuration should look like this to get https working:

[server]
PROTOCOL  = https
ROOT_URL  = https://git.example.com:3000/
HTTP_PORT = 3000
CERT_FILE = cert.pem
KEY_FILE  = key.pem

Then it took me quite a while to get it working until I realized that the values for the CERT_FILE and KEY_FILE should be absolute paths instead of the literal relative path.

Originally created by @cdluminate on GitHub (Jan 19, 2021). In the documentation (https://docs.gitea.io/en-us/https-setup/), it is said that the configuration should look like this to get https working: ``` [server] PROTOCOL = https ROOT_URL = https://git.example.com:3000/ HTTP_PORT = 3000 CERT_FILE = cert.pem KEY_FILE = key.pem ``` Then it took me quite a while to get it working until I realized that the values for the `CERT_FILE` and `KEY_FILE` should be absolute paths instead of the literal relative path.
GiteaMirror added the type/docs label 2025-11-02 07:04:45 -06:00
Author
Owner

@6543 commented on GitHub (Jan 19, 2021):

whould this had helped you ?

-CERT_FILE = cert.pem
-KEY_FILE  = key.pem
+CERT_FILE = /path/cert.pem
+KEY_FILE  = /path/key.pem

without absolute it's relative to $CUSTOM_ROOT ...

@6543 commented on GitHub (Jan 19, 2021): whould this had helped you ? ```diff -CERT_FILE = cert.pem -KEY_FILE = key.pem +CERT_FILE = /path/cert.pem +KEY_FILE = /path/key.pem ``` without absolute it's relative to $CUSTOM_ROOT ...
Author
Owner

@cdluminate commented on GitHub (Jan 20, 2021):

@6543 Yes. I think that /path/ hint is enough to help people understand it correctly. And probably CUSTOM_ROOT should be documented somewhere as well.

@cdluminate commented on GitHub (Jan 20, 2021): @6543 Yes. I think that `/path/` hint is enough to help people understand it correctly. And probably `CUSTOM_ROOT` should be documented somewhere as well.
Author
Owner

@6543 commented on GitHub (Jan 20, 2021):

I have to correct myselve ... it's called GITEA_CUSTOM ... @cdluminate would you mind to create/propose a pull for the docs?

(It's generated by hugo, you find the files at /docs/)

@6543 commented on GitHub (Jan 20, 2021): I have to correct myselve ... it's called `GITEA_CUSTOM` ... @cdluminate would you mind to create/propose a pull for the docs? (It's generated by hugo, you find the files at [/docs/](https://github.com/go-gitea/gitea/tree/master/docs))
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6722