server {
listen 80;
server_name www.gaov.com;
#access_log logs/www.gaov.com.access.log main;
location / {
index index.html index.htm index.php;
root /home/wwwroot/www.gaov.com;
}
location ~ \.php$ {
root /home/wwwroot/www.gaov.com;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/wwwroot/www.gaov.com$fastcgi_script_name;
include fastcgi_params;
}
}
其中php方面的 root是你的网站目录
fastcig_pass 是与php-fpm进行交互的端口,此处修改也需要修改php-fpm.conf中的相应监听端口
时间: 2024-10-29 10:46:22