nginx服务器纳闷析PHP

WBOY
Release: 2016-06-13 13:05:01
Original
764 people have browsed it

nginx服务器不解析PHP~

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
server{
    listen 8881;
    server_name d2.test.com;
    index index.html index.htm index.php;
    root /home/web/d2.test.com/root/;

    location / {
       index  index.php index.html;
       if (!-e $request_filename){
           #rewrite ^/(.*)$ /index.php?/$1? last;
           rewrite (.*) /index.php/$1;
        }
    }

    location ~ \.php {
       fastcgi_pass  127.0.0.1:9000;
       fastcgi_index index.php;
       include fastcgi_params;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       fastcgi_param PATH_INFO $fastcgi_script_name;
       access_log off;
    }
}

Copy after login


这是我的一个项目,现在访问这个项目时,nginx没有解析PHP,而是直接下载文件,而且格式是如“IB2EreFS.part”的文件,但文件内容就是php内容。

以前没用过nginx,要怎么修改呢?谢谢大家!
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template