如果你已经有一个域名并且想与 Gitea 共享该域名,你可以增加以下 nginx.conf
配置中 server
的 http
部分,为 Gitea 添加路由规则:
server {
listen 80;
server_name git.example.com;
location /git/ { # Note: Trailing slash
proxy_pass http://localhost:3000/; # Note: Trailing slash
}
}
然后在你的 Gitea 配置文件中添加 [server] ROOT_URL = http://git.example.com/git/
。