php runs fine as index.php but any other filename then it spits out the error below. Any help would be greatly appreciated.
Warning: Unknown: Filename cannot be empty in Unknown on line 0
Fatal error: Unknown: Failed opening required '' (include_path='.:/usr/local/lib/php') in Unknown on line 0
Here is my configuration file:
server {
listen 80;
server_name www.domainname.com domainname.com;
access_log /home/domainname/logs/access.log;
error_log /home/domainname/logs/error.log;
location / {
root /home/domainname/public_html;
index index.php index.html;
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php/$1 last;
}
}
# if the request starts with our frontcontroller, pass it on to fastcgi
location ~ \.php
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/domainname/public_html$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}