diff --git a/roles/nginx/templates/vhosts/fav.libertus.eu.conf.j2 b/roles/nginx/templates/vhosts/fav.libertus.eu.conf.j2 index 47515eb..761607f 100644 --- a/roles/nginx/templates/vhosts/fav.libertus.eu.conf.j2 +++ b/roles/nginx/templates/vhosts/fav.libertus.eu.conf.j2 @@ -9,13 +9,19 @@ server { } location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { - expires 2w; - log_not_found off; - } + expires 2w; + log_not_found off; + } - location ~ \.php$ { - try_files $uri $uri/ =404; + location / { + try_files _ /index.php$is_args$args; + } + + location ~ index\.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(index.php)(/.+)$; fastcgi_pass unix:/var/run/php/php{{ php_version }}-fpm.sock; + fastcgi_index index.php; include fastcgi_params; } }