releases.attachment Request Entity Too Large #2797

Closed
opened 2025-11-02 04:48:50 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @yuelwish on GitHub (Jan 23, 2019).

Gitea version 8006b1b

Platform: Debian GNU/Linux 9

I want to publish a go compilation file of 1.8M, upload failed

error message:

<html>
 <head><title>413 Request Entity Too Large</title></head>
 <body bgcolor="white">
 <center><h1>413 Request Entity Too Large</h1></center>
 <hr><center>nginx/1.10.3</center>
 </body>
 </html>
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->

app.ini

[attachment]
ENABLED        = true
ALLOWED_TYPES  = */*
MAX_SIZE       = 200
MAX_FILES      = 100
Originally created by @yuelwish on GitHub (Jan 23, 2019). Gitea version 8006b1b Platform: Debian GNU/Linux 9 I want to publish a go compilation file of 1.8M, upload failed > error message: ``` <html> <head><title>413 Request Entity Too Large</title></head> <body bgcolor="white"> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.10.3</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> ``` > app.ini ``` [attachment] ENABLED = true ALLOWED_TYPES = */* MAX_SIZE = 200 MAX_FILES = 100 ```
Author
Owner

@zeripath commented on GitHub (Jan 23, 2019):

That error appears to be coming from nginx not Gitea.

Is it possible that nginx is rejecting the upload?

@zeripath commented on GitHub (Jan 23, 2019): That error appears to be coming from nginx not Gitea. Is it possible that nginx is rejecting the upload?
Author
Owner

@yuelwish commented on GitHub (Jan 23, 2019):

Thank you.

I added the following to nginx

client_header_timeout 120s;         
client_body_timeout 120s;           
client_max_body_size 200m;   
@yuelwish commented on GitHub (Jan 23, 2019): Thank you. I added the following to nginx ``` client_header_timeout 120s; client_body_timeout 120s; client_max_body_size 200m; ```
Author
Owner

@rom111419 commented on GitHub (Mar 28, 2019):

NginX as a reverse proxy
If you are using multiple domains / web services on the same server (port 80), the request must be redirected to the appropriate service / port. For this you use reverse proxy. My NginX works here on an arched box.

server {
    listen 80;
    server_name git.xxxx.de;
    client_max_body_size 100M; # Push large objects to gitea

    location / {
        proxy_pass http://127.0.0.1:3000;
    }
}
@rom111419 commented on GitHub (Mar 28, 2019): **NginX as a reverse proxy** If you are using multiple domains / web services on the same server (port 80), the request must be redirected to the appropriate service / port. For this you use reverse proxy. My NginX works here on an arched box. ``` server { listen 80; server_name git.xxxx.de; client_max_body_size 100M; # Push large objects to gitea location / { proxy_pass http://127.0.0.1:3000; } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2797