配置nginx支持PHP
打开nginx.conf文件,配置如下
location / {
root /usr/share/nginx/www/blog;
index index.php index.html index.htm;
}
location ~ \.php$ {
root /usr/share/nginx/www/blog;
fastcgi_pass 127.0.0.1:9000;#端口号为php-fpm的端口
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi.conf;
}
```