42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
upstream gitea {
|
|
server gitea:3000;
|
|
}
|
|
|
|
map $http_x_forwarded_proto $forwarded_proto {
|
|
default $http_x_forwarded_proto;
|
|
'' $scheme;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
client_max_body_size 512M;
|
|
|
|
# If TLS is terminated by another proxy in front of this one, uncomment and
|
|
# set its address so Gitea logs and rate limits see the real client IP
|
|
# instead of the proxy's.
|
|
# set_real_ip_from 10.0.0.0/8;
|
|
# real_ip_header X-Forwarded-For;
|
|
# real_ip_recursive on;
|
|
|
|
location / {
|
|
proxy_pass http://gitea;
|
|
proxy_http_version 1.1;
|
|
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 $forwarded_proto;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
|
|
# Large clones and pushes take longer than the 60s default.
|
|
proxy_connect_timeout 60s;
|
|
proxy_send_timeout 600s;
|
|
proxy_read_timeout 600s;
|
|
}
|
|
}
|