Laragon + PhpMyAdmin + Nginx: 413 Errors
-
Hello everyone,
I'm having a lot of problems trying to import database files from our production server to a local environment. It seems every file causes nginx to return a "413 Request Entity Too Large" message.
I've already tried to modify the php.ini settings, but it seems that is not the problem; it appears to be an issue with nginx, which I don't have much experience with.
Is there an easy solution for this? Would a quick fix be to remove and reinstall the Apache version?
Also, if the devs read this--either increasing the nginx filesize limit, or providing clear documentation on how to do so, would be a major usability improvement. Currently, even a 1.53MB sql file causes an error, and that is actually a tiny filesize for a DB table import.
Thanks in advance,
~David
-
@DavidOgAds: You can update nginx.conf to increase client_max_body_size.
Here's how:
Open nginx.conf (Menu > nginx > nginx.conf)
Add client_max_body_size 200M; under http {http { client_max_body_size 200M; ... }
Reload Nginx.
Note: You can change 200M to the value you prefer.
Here is a nginx.conf for you to reference:#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { client_max_body_size 200M; include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; include "C:/laragon/etc/nginx/php_upstream.conf"; include "C:/laragon/etc/nginx/sites-enabled/*.conf"; }
-
@leokhoa
Thank you so much for this, it worked perfectly, and now I'm enjoying Laragon bliss again!
~David
-
@DavidOgAds: Glad to hear it that! cheer