1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00

Fix large-upload problems by setting PHP limits and Nginx max size

- Sets `client_max_body_size 128M` in `http` section of `nginx.conf`  so it covers all configs
- Adds `php-memory-limits.conf` to `php-fpm` conf folder, to set `memory_limit`, `upload_max_filesize`, `post_max_size` all to 128M

(Updates #253 by moving config location to cover all, since #253 didn't cover secure configs, etc)
This commit is contained in:
Chris Brown
2016-12-24 14:30:35 -05:00
parent 42e5fc325b
commit bb59e1da2d
6 changed files with 28 additions and 1 deletions

View File

@@ -25,6 +25,8 @@ public function tearDown()
public function test_fpm_is_configured_with_the_correct_user_group_and_port()
{
copy(__DIR__.'/files/fpm.conf', __DIR__.'/output/fpm.conf');
mkdir(__DIR__.'/output/conf.d');
copy(__DIR__.'/files/php-memory-limits.ini', __DIR__.'/output/conf.d/php-memory-limits.ini');
resolve(StubForUpdatingFpmConfigFiles::class)->updateConfiguration();
$contents = file_get_contents(__DIR__.'/output/fpm.conf');
$this->assertContains(sprintf("\nuser = %s", user()), $contents);