upstream git_server {
server xx.xx.xx.xx:6060;
}
server {
listen 80;
server_name git.domainname.com;
location / {
client_max_body_size 0;
proxy_buffering off;
proxy_http_version 1.1;
proxy_pass http://git_server;
proxy_pass_header Authorization;
proxy_read_timeout 10000s;
proxy_redirect off;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
By default, Nginx has a limit of 1MB on file uploads.
To set file upload size, you can use the client_max_body_size
directive, which is part of Nginx’s ngx_http_core_module
module.
This directive can be set in the http, server or location context.
It sets the maximum allowed size of the client request body, specified in the "Content-Length" request header field. Here’s an example of increasing the limit to 100MB in /etc/nginx/nginx.conf
file.
http {
...
client_max_body_size 100M;
}