server {
listen 8080;server_name 47.93.198.167:8080;
location / {
root /home/test;
index index.php index.html index.htm;
}
location ~ \.php$ {
root /home/test; #指定php的根目录
fastcgi_pass 127.0.0.1:9000;#php-fpm的默认端口是9000
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
~