My nginx.conf
file is getting larger and large with dozens of vhosts repeating the same lines over and over. I was wondering if there is anyway to declare the following globally without having to repeat them for each project:
# Route all requests for non-existent files to index.php
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
}
location ~ \.php($|/) {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
}