Welcome! Log In Create A New Profile


nginx+php-fpm configuration issue

Posted by floweringmind 
nginx+php-fpm configuration issue
January 10, 2010 07:26PM
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_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;

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 65
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready