My web system (Laravel) had 2 domain which company.test.hero (which can only be access by my company network) and example.com (which point to company.test.hero and can be access by public)
The problem is when I want to upload file, if I connect to my company network I can upload file without problem.
But if I connect with other network, it will give Error 413-request-entity-too-large (I try to upload file size 2.86mb).
I already setting NGINX upload limit in folder etc>nginx>nginx.conf
client_max_body_size 20M;
I also had set etc>php.ini upload limit.
upload_max_filesize = 20M
memory_limit = 256M
post_max_size 20M
Edit your NGiNX configuration file (usually /etc/nginx/nginx.conf
) and add this line into the http section:
http {
client_max_body_size 100M;
}
Note: Don't use MB, use only M or it will not work!
Also do not forget to restart nginx:
systemctl restart nginx