I'm a new user to ubuntu,nginx,and I installed lnmp on ubuntu 14.0.4.This is my nginx config:
server {
[others...]
index index.php index.html index.htm;
[others...]
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# # With php5-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
# fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
[others...]
}
And I have set 'cgi.fix_pathinfo = 0;' in my php.ini.I created a php file under /usr/share/nginx/html/
named index.php,and the content is :
<?php
echo phpinfo();
?>
but the broswer download it.What should I do?