基本信息
CentOS:Linux r730 6.12.0-224.el10.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 19:40:37 UTC 2026 x86_64 GNU/Linux
Gitea:gitea version 1.26.2 built with go1.26.3-X:jsonv2 : bindata, sqlite, sqlite_unlock_notify
Nginx:nginx version: nginx/1.26.3
问题
The detected web site URL is "http://xxxx(域名或ip)/", it's unlikely matching the site config.
Mismatched app.ini ROOT_URL or reverse proxy "Host/X-Forwarded-Proto" config might cause wrong URL links for web UI/mail content/webhook notification/OAuth2 sign-in
这种情况下,能正常访问gitea,但是一旦创建组织或者库的时候就会报错,无法正常创建。
解决过程
跟者网上的教程走,配置文件反反复复的各种修改,重置,都是不行。
最后是问deepseek,经过漫长个各种询问之后,后面给出了个方案。
nginx的代理配置传输时硬性指定端口。
由
bash
proxy_set_header Host $host;
改为
bash
proxy_set_header Host $host:$server_port;
区别就是将端口直接在卸载代理的Host中。