Connecting Tech Pros Worldwide Forums | Help | Site Map

Nginx help

dheerajjoshim's Avatar
Needs Regular Fix
 
Join Date: Jul 2009
Location: Bangalore, INDIA
Posts: 263
#1: Jul 21 '09
Hi...
I installed nginx in to fedora core 4 to host few php pages.

it is in /usr/local/nginx

config file look like:

location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}

So basically my php file is in .usr/local/nginx/html
But in browser it says file is unavailable.(all files even index.php)

What may be error?
I have started my server.
and php file gets compiled in terminal.

And sorry for posting it here.. i did not find any other topic to post.

Regards
Dheeraj Joshi

dheerajjoshim's Avatar
Needs Regular Fix
 
Join Date: Jul 2009
Location: Bangalore, INDIA
Posts: 263
#2: Jul 23 '09

re: Nginx help


Nobody has posted any comments.
Anyway i got the solution..

I am planing to post installation steps here since nobody has commented.

How is that?
Canabeez's Avatar
Member
 
Join Date: Jul 2009
Location: Israel
Posts: 85
#3: Jul 23 '09

re: Nginx help


Quote:

Originally Posted by dheerajjoshim View Post

Hi...
I installed nginx in to fedora core 4 to host few php pages.

it is in /usr/local/nginx

config file look like:

location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}

So basically my php file is in .usr/local/nginx/html
But in browser it says file is unavailable.(all files even index.php)

What may be error?
I have started my server.
and php file gets compiled in terminal.

And sorry for posting it here.. i did not find any other topic to post.

Regards
Dheeraj Joshi

I think you have some syntax errors in your config file, why do you include the fastcgi_params? This link might help you.
dheerajjoshim's Avatar
Needs Regular Fix
 
Join Date: Jul 2009
Location: Bangalore, INDIA
Posts: 263
#4: Jul 25 '09

re: Nginx help


Syntactically it is correct....

It is working fine now...
Reply