Right, so I have this folder: /home/sites/dev/testphp/ inside this folder there's an index.php file, with a simple echo line. I also have a /home/sites/dev/testhtml/ with an index.html file.
When I visit http://testhtml.dev.ilun.no/ it works as expected. But when I visit http://testphp.dev.ilun.no/ I simply get "No input file specified."
This is my config so far:
server {
listen 80;
server_name dev.ilun.no www.dev.ilun.no;
root /home/sites/dev;
index index.php index.html;
}
server {
listen 80;
server_name ~^(.*)\.dev.ilun\.no$;
root /home/sites/dev/$1;
index index.php index.html;
if (!-d /home/sites/dev/$1) {
rewrite . http://dev.ilun.no/ redirect;
}
location ~ .php$ {
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
I'm completely stuck on this, and can't figure it out yet. Any suggestions?