symfonny 5 on Ubuntu 18.04
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/symfony5/public;
index index.php;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
client_max_body_size 100M;
autoindex off;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
include fastcgi_params;
fastcgi_intercept_errors on;
}
}