Skip to content
Advertisement

HTTP 413: Request too large

Using Apache 2.4 & PHP 7.4 on Ubuntu 18.04. Default Apache conf file. I’m trying to upload ~700 jpegs (totaling ~100MB, largest one being ~1MB) to a Laravel app, for a single one it works but for the larger request size I get:

The server returned a “413 Payload Too Large”.

Site config looks like:

JavaScript

/etc/php/7.4/apache2/php.ini has:

JavaScript

I’ve restarted Apache after applying. I see the POST request in my access.logs:

JavaScript

and (normal looking) debug logs in error logs:

JavaScript

I don’t see anything related in my application logs. Also tried setting LimitRequestBody in the apache2.conf but didn’t help either.

Advertisement

Answer

Artisan Serve – which the Laravel app is using to start the server, using the php.ini at php-cli not the one at php-apache or php-fpm modifying the config in that, resolved this.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement