server { listen 80; server_name vbox.automation.intranet; root /usr/share/webapps/phpvirtualbox; location / { index index.php index.html; try_files $uri $uri/ =404; } # redirect server error pages to the static page /50x.html error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ [^/]\.php(/|$) { # Correctly handle request like /test.php/foo/blah.php or /test.php/ fastcgi_split_path_info ^(.+?\.php)(/.*)$; try_files $uri $document_root$fastcgi_script_name =404; # Mitigate https://httpoxy.org/ vulnerabilities fastcgi_param HTTP_PROXY ""; fastcgi_pass unix:/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }