File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ date : " 2018-06-02T11:00:00+02:00"
3
+ title : " Usage: HTTPS setup"
4
+ slug : " https-setup"
5
+ weight : 12
6
+ toc : true
7
+ draft : false
8
+ menu :
9
+ sidebar :
10
+ parent : " usage"
11
+ name : " HTTPS setup"
12
+ weight : 12
13
+ identifier : " https-setup"
14
+ ---
15
+
16
+ # HTTPS setup to encrypt connections to Gitea
17
+
18
+ ## Using built-in server
19
+
20
+ Before you enable HTTPS make sure that you have valid SSL/TLS certificates.
21
+ You could use self-generated certificates for evaluation and testing. Please run ` gitea cert --host [HOST] ` to generate a self signed certificate.
22
+
23
+ To use Gitea's built-in HTTPS support you must change your ` app.ini ` file:
24
+
25
+ ``` ini
26
+ [server]
27
+ PROTOCOL =https
28
+ ROOT_URL = `https://git.example.com:3000/`
29
+ HTTP_PORT = 3000
30
+ CERT_FILE = cert.pem
31
+ KEY_FILE = key.pem
32
+ ```
33
+ To learn more about the config values, please checkout the [ Config Cheat Sheet] ( ../config-cheat-sheet#server ) .
34
+
35
+ ## Using reverse proxy
36
+
37
+ Setup up your reverse proxy like shown in the [ reverse proxy guide] ( ../reverse-proxies ) .
38
+
39
+ After that, enable HTTPS by following one of these guides:
40
+
41
+ * [ nginx] ( https//nginx.org/en/docs/http/configuring_https_servers.html )
42
+ * [ apache2/httpd] ( https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html )
43
+ * [ caddy] ( https://caddyserver.com/docs/tls )
44
+
45
+ Note: You connection between your reverse proxy and gitea might be unencrypted. To encrypt it too follow the [ built-in server guide] ( #using-built-in-server ) and change
46
+ the proxy url to ` https://[URL] ` .
You can’t perform that action at this time.
0 commit comments