网站首页 博客 nginx配置运行php环境
nginx配置运行php环境
 2017-05-25 17:56:25  管理员  201

Nginx运行php是通过fastcgi方式,配置方法如下

location ~ \.php$ {

    root   /path/to/webroot;

    fastcgi_pass   127.0.0.1:9000;

    fastcgi_index  index.php;

    fastcgi_param  s.c.r.i.p.t_FILENAME  $document_root$fastcgi_s.c.r.i.p.t_name;

    include        fastcgi_params;

}

然后重启Nginx

来说两句吧
最新评论