php - ngnix 不打开文件而是下载文件怎么回事
PHP中文网
PHP中文网 2017-04-10 17:36:04
0
1
299

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen 8089;
        server_name localhost;

        root D:\workspace/hangjiayun;
        index index.html index.htm index.php;

        location / {
            try_files $uri $uri/ /index.php;
        }

        location ~ \.php$ {
            try_files $uri =404;
            include fastcgi.conf;
            fastcgi_pass 127.0.0.1:9000;
        }
    }

}
PHP中文网
PHP中文网

认证0级讲师

全部回复(1)
小葫芦

应该是php文件没有解析,确保php-fpm正常启动的情况下,
看下你的nginx配置是否正确
fastcgi_pass 127.0.0.1:9000;

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板