Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| services:gitea [2024/02/22 09:55] – willy | services:gitea [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== GITea ====== | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | Installing is easy: | ||
| - | <code bash> | ||
| - | > echo "> | ||
| - | > emerge -v gitea | ||
| - | </ | ||
| - | |||
| - | Then you want to move repositories and data and config to your RAID drive, this can be done by changing user gitea home folder: | ||
| - | <code bash> | ||
| - | > usermod -d / | ||
| - | </ | ||
| - | |||
| - | Adapt default config, edit **/ | ||
| - | < | ||
| - | GITEA_CONF="/ | ||
| - | GITEA_WORK_DIR="/ | ||
| - | </ | ||
| - | |||
| - | and also edit your **/ | ||
| - | < | ||
| - | BASE_URL = https:// | ||
| - | HTTP_ADDR = 127.0.0.1 | ||
| - | HTTP_PORT = 3001 | ||
| - | </ | ||
| - | |||
| - | === Reverse Proxy setup === | ||
| - | |||
| - | And setup NGINX reverse proxy by creating **gitea.conf**: | ||
| - | <file gitea.conf> | ||
| - | location /gitea/ { | ||
| - | client_max_body_size 512M; | ||
| - | |||
| - | # make nginx use unescaped URI, keep " | ||
| - | rewrite ^ $request_uri; | ||
| - | rewrite ^/ | ||
| - | proxy_pass http:// | ||
| - | |||
| - | proxy_set_header Connection $http_connection; | ||
| - | proxy_set_header Upgrade $http_upgrade; | ||
| - | proxy_set_header Host $host; | ||
| - | proxy_set_header X-Real-IP $remote_addr; | ||
| - | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| - | proxy_set_header X-Forwarded-Proto $scheme; | ||
| - | proxy_set_header X-WEBAUTH-USER $remote_user; | ||
| - | proxy_set_header Authorization ""; | ||
| - | } | ||
| - | </ | ||
| - | (refer to [[selfhost: | ||
| - | |||
| - | Now your remote URLs are in the following format: | ||
| - | < | ||
| - | For SSH urls: ssh:// | ||
| - | </ | ||
| - | |||
| - | == Using Reverse Proxy authentication === | ||
| - | |||
| - | GITea support reverse proxy authentication. The above NGINX config already set it up, but you need to open GITea settings and go to **Authentication Sources** and replace the existing one (or add a new one) ad **PAM_Auth**. The settings you need are: | ||
| - | * pam_service_name: | ||
| - | |||
| - | that's it. | ||
| - | |||
| - | |||