I have nginx, php 5 and php5-fpm installed on ubuntu 10.04 server
edition.
After I started the nginx server, I have no problem loading the regular
html pages. but all .php pages cannot be viewed, firefox just pop out a
window asking me if I wnat to download the file.
I also tried IE, on IE, it just shows the source code.
I checked both nginx and php5-fpm error log files, didn’t see any
errors. did I miss something during the configuration?
I dont know if the problem is nginx or php5_fpm, I need someone to
point me to the rite direction
Mike, you are rite. I replace my “default” file with this one. now
everything works.
server {
server_name localhost;
listen 80; # listen on port 80
root /www; # our root document path
index index.php index.html index.htm;
location ~* \.php$ { # for requests ending with .php
# specify the listening address and port that you configured
previously
fastcgi_pass 127.0.0.1:9000;
# the document path to be passed to PHP-FPM
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# the script filename to be passed to PHP-FPM
fastcgi_param PATH_INFO $fastcgi_script_name;
# include other FastCGI related configuration settings
include fastcgi_params;
}
}