Also, apparently one has to restart nginx after making changes - even this is something I'm not sure how you do on forge.
How to fix 413 Request Entity Too Large - n00b edition?
I just deployed a site on forge, and as I was testing a file upload form I ran into "413 Request Entity Too Large" error.
Searching for it there appear to be some "nginx" configuration that needs to be set. However, my n00bness here appear to defeat me. I don't actually know how I do this on a forge server.
From the forge control panel I found a Edit Files button in the Site view. This lead me to a screen that says "Edit ngix Configuration" and the content:
server {
listen 80;
server_name staging.example.com;
root /home/forge/staging.example.com/public;
# FORGE SSL (DO NOT REMOVE!)
# ssl_certificate;
# ssl_certificate_key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/staging.example.com-error.log error;
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
Can I simply add client_max_body_size 10M; somewhere in that file? (Any particular order this needs to be in)?
If that isn't the location? Where and how do I do this on a forge site?
uhm... did I really miss the obvious?
Server Details > Meta > Max File Upload Size? sheeesh!
Please or to participate in this conversation.