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;
}
Full CyberPanel Reverse Proxy Virtual Host Configuration
Configure custom domain using OpenLightSpeed for CyberPanel Administration instead of custom_ip:8090
create an empty website with issued SSL by navigating to "Create Website", then add this configuration to
vhostfor this virtual website:docRoot $VH_ROOT/public_html vhDomain $VH_NAME vhAliases www.$VH_NAME adminEmails info@custom_domain.com enableGzip 1 enableIpGeo 1 extprocessor cyberpanel_backend { type proxy address https://127.0.0.1:8090 maxConns 20 pcKeepAliveTimeout 60 initTimeout 60 retryTimeout 0 respBuffer 0 } context / { type proxy handler cyberpanel_backend addDefaultCharset off } rewrite { enable 1 autoLoadHtaccess 1 rules <<<END_rules RewriteCond %{HTTPS} !on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] END_rules } errorlog $VH_ROOT/logs/$VH_NAME.error_log { useServer 0 logLevel WARN rollingSize 10M } accesslog $VH_ROOT/logs/$VH_NAME.access_log { useServer 0 logFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" logHeaders 5 rollingSize 10M keepDays 10 compressArchive 1 } module cache { storagePath /usr/local/lsws/cachedata/$VH_NAME } vhssl { keyFile /etc/letsencrypt/live/cyberpanel.custom_domain.com/privkey.pem certFile /etc/letsencrypt/live/cyberpanel.custom_domain.com/fullchain.pem certChain 1 sslProtocol 24 enableECDHE 1 renegProtection 1 sslSessionCache 1 enableSpdy 15 enableStapling 1 ocspRespMaxAge 86400 }same in CLI:
Listener Configuration (Main Config)
Add/verify these in the main LiteSpeed config:
add these lines:
then restart lshttpd and lsws
systemctl restart {lshttpd,lsws} # Test config /usr/local/lsws/bin/lswsctrl statusconfigure firewall
Now everything should work properly.