Closed
Description
Symfony version(s) affected: probably every including #36855
Description
Now that HttpKernel’s logger uses error_log
by default, it will make nginx choke with
upstream sent too big header while reading response header from upstream
if it sends some, using the default php-fpm and nginx docker images.
How to reproduce
- Start from symfony/skeleton
composer create-project symfony/skeleton symfony
cd symfony
- Add
docker-compose.yml
version: "3"
services:
nginx:
image: nginx:1.19.3-alpine
ports:
- 80:80
volumes:
- ./www.conf:/etc/nginx/conf.d/www.conf:ro
- ./public:/usr/share/nginx/html:ro
php:
image: php:7.4.11-fpm-alpine3.12
volumes:
- ./:/var/www/html
- Add
www.conf
server {
server_name domain.test;
root /usr/share/nginx/html;
location / {
try_files $uri /index.php$is_args$args;
}
location = /index.php {
fastcgi_pass php:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/html/public/index.php;
internal;
}
}
- Require some packages
composer require symfony/security-bundle symfony/stopwatch symfony/web-profiler-bundle
- Start services
docker-compose up -d
- Make
domain.test
resolve to 127.0.0.1 - Access http://domain.test/