首页 > 代码库 > nginx 1.12 配置解析php

nginx 1.12 配置解析php

server {
    listen 80;
    server_name foo.com;

    root /path;
    index index.html index.htm index.php;

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

    location ~ \.php$ {
        try_files $uri =404;

        include fastcgi.conf;
        fastcgi_pass 127.0.0.1:9000;
    }
}

技术分享

 


参考:https://huoding.com/2013/10/23/290

http://blog.csdn.net/dengjiexian123/article/details/53358452

nginx 1.12 配置解析php