|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
--- |
|
|
|
|
title: Problems and solutions with Gitea 1.15 |
|
|
|
|
tags: [tutorial, gitea, mariadb, postgresql] |
|
|
|
|
updated: 2021-09-13 14:00:00 |
|
|
|
|
updated: 2021-09-13 14:48:00 |
|
|
|
|
description: This blog is now self-hosted |
|
|
|
|
--- |
|
|
|
|
|
|
|
|
@ -601,7 +601,31 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
|
|
|
|
|
|
|
|
|
|
### Apache2 reverse proxy for Gitea |
|
|
|
|
|
|
|
|
|
1. clearnet configuration in `/etc/apache2/apache2.conf` or a virtual host file: |
|
|
|
|
1. modify Gitea configuration (`/etc/gitea/app.ini`): |
|
|
|
|
|
|
|
|
|
```ini |
|
|
|
|
[server] |
|
|
|
|
PROTOCOL = unix |
|
|
|
|
DOMAIN = localhost |
|
|
|
|
HTTP_ADDR = /var/run/gitea/gitea.sock |
|
|
|
|
UNIX_SOCKET_PERMISSION = 770 |
|
|
|
|
|
|
|
|
|
; Do not set this variable if PROTOCOL is set to 'unix'. |
|
|
|
|
# LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/ |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
2. Add the www-data user to gitea's group so it can access the socket. |
|
|
|
|
|
|
|
|
|
```shell |
|
|
|
|
usermod -aG gitea www-data |
|
|
|
|
``` |
|
|
|
|
3. Restart gitea and apache |
|
|
|
|
|
|
|
|
|
```shell |
|
|
|
|
systemctl restart gitea.service apache2.service |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
4. clearnet configuration in `/etc/apache2/apache2.conf` or a virtual host file: |
|
|
|
|
|
|
|
|
|
variables (shell style): |
|
|
|
|
|
|
|
|
@ -644,7 +668,7 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
|
|
|
|
|
</VirtualHost> |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
2. if you use TOR add this configuration in `/etc/apache2/apache2.conf` or a virtual host file: |
|
|
|
|
5. if you use TOR add this configuration in `/etc/apache2/apache2.conf` or a virtual host file: |
|
|
|
|
|
|
|
|
|
variables (shell style): |
|
|
|
|
|
|
|
|
@ -697,7 +721,7 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
|
|
|
|
|
</IfModule> |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
3. if you use TOR, add this to `/etc/tor/torrc` |
|
|
|
|
6. if you use TOR, add this to `/etc/tor/torrc` |
|
|
|
|
|
|
|
|
|
variables (shell style): |
|
|
|
|
|
|
|
|
|