nginx支持php配置

location / {
root /wwwroot/phptest;
index index.html index.htm index.php;
}

location ~ .(php|php5)$ {
root /wwwroot/phptest;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /wwwroot/phptest$fastcgi_script_name;
include fastcgi_params;
}

原文地址:https://www.cnblogs.com/pzrr/p/3669163.html