Hi!
After installation, a notification is displayed in the web interface:
Your ROOT_URL in app.ini is undefined but you are visiting https://git.srv.com/ You should set ROOT_URL correctly, otherwise the web may not work correctly.
I can’t understand what is the problem.
My configuration:
Gitea 1.16.8 (installed from binary)
Nginx as reverse proxy.
I configured according to the official documentation.
[server] section from /etc/gitea/app.ini:
[server]
SSH_DOMAIN = git.srv.com
DOMAIN = git.srv.com
HTTP_ADDR = 127.0.0.1
HTTP_PORT = 3000
ROOT_URL = https://git.srv.com/
STATIC_URL_PREFIX = /_/static
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
LFS_JWT_SECRET = xxxxxxxxxxxxxx
OFFLINE_MODE = false
LANDING_PAGE = login
Nginx config:
server {
listen 443 ssl http2;
server_name git.srv.com;
ssl_certificate /etc/letsencrypt/live/srv.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/srv.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/srv.com/chain.pem;
resolver 127.0.0.1 8.8.8.8 valid=300s;
resolver_timeout 5s;
ssl_stapling on;
ssl_stapling_verify on;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:RSA+3DES:!NULL:!RC4;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
add_header Strict-Transport-Security "max-age=31536000";
location /_/static/assets {
alias /var/www/gaba/www/srv.com/git/public;
}
location / {
client_max_body_size 0;
proxy_pass http://127.0.0.1:3000;
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_max_temp_file_size 0;
proxy_redirect off;
proxy_read_timeout 120;
}
}
How to fix it?
Web interface and remote operations with repositories (via ssh and https) work fine.