我的lnmp有什么问题?

时间:2015-10-05 17:54:30

标签: php ubuntu nginx

我是ubuntu,nginx的新用户,我在ubuntu 14.0.4上安装了lnmp。这是我的nginx配置:

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...]
}

我设置'cgi.fix_pathinfo = 0;'在我的php.ini.I中创建了一个名为index.php的/usr/share/nginx/html/下的php文件,内容为:

 <?php
   echo phpinfo();
 ?>

但broswer下载它。我该怎么办?

0 个答案:

没有答案