413 Request Entity Too Large only on HTTPS

Discussion in 'Server Operation' started by thenutz, Sep 18, 2016.

  1. thenutz

    thenutz New Member

    Hy there everyone !
    I have ubuntu 16.04 with nginx compiled with module pagespeed. I also have installed ISPConfig 3.1.
    Today when i try to upload some sql files into phpmyadmin i get stuck with this nginx error 413 Request Entity Too Large.
    After a long search on Google i manage to solve half o the problem by adding :
    Code:
    client_max_body_size 700M;
    location / {
    client_max_body_size 700M;
    }
    in to the ispconfig site option directives.
    Everything works great in http but in https i get this error. Any idea how to solve this ?
    Thanks
     
  2. You have probably setup above parameters for only 80 port(http). You will need to setup the same for 443(https) port as well.
     
  3. Christian Roth

    Christian Roth New Member

    That is rarely explained. thanks.
     
  4. peterpetr

    peterpetr New Member HowtoForge Supporter

    I have the same problem. My NGINX + ISPconfig 3.1 Ubuntu 16.04 VPS is responding with this nginx error 413 Request Entity Too Large, only when using HTTPS (SSL).

    Question: How do I setup so 443 (SSL) also allows maximum file upload size of 100M?

    I use this VPS primarily to host WordPress sites so have the following Directive Snippents:
    Custom php.ini settings:
    display_errors = On
    post_max_size = 99M
    upload_max_filesize = 255M
    max_execution_time = 220
    memory_limit = 256M
    max_input_vars = 2000​
    Nginx Directives:
    http {
    #...
    client_max_body_size 100m;
    }
    location / {
    try_files $uri $uri/ /index.php?$args;
    }
    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
    expires max;
    log_not_found off;
    }​
     
  5. Hi,
    This snippet coudl be for :80? Where is your 443 snippet? You will need to add that over there.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The directive snippets in ISPConfig are for http and https. The only issue was that he added:

    http {
    #...
    client_max_body_size 100m;
    }

    which needs to be removed as you can not have http {....} inside a server block, but that's solved already in this thread in the meantime:

    https://www.howtoforge.com/community/threads/trouble-with-ssl-on-ispconfig-3-1-with-nginx.75947/
     

Share This Page