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 - Python技术站