server { listen 80; index index.php; root /var/www/alltube/; types { text/css css; text/xml xml; text/html html htm shtml; application/x-web-app-manifest+json webapp; } location ~ /\. { deny all; } location / { try_files $uri /index.php?$args; } location ~ \.php$ { include fastcgi_params; fastcgi_pass unix:/run/php-fpm.sock; try_files $uri /index.php?$args; fastcgi_buffers 4 16k; fastcgi_buffer_size 16k; fastcgi_index index.php; fastcgi_intercept_errors off; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }