nginx,同一域名,同一端口下配置多个项目,那么php连接应该怎么配置两个?
这里定义了两个站点
location /discuz {
alias /usr/local/nginx/html/discuz/upload;
index index.php;
}
location /wordpress {
alias /usr/local/nginx/html/wordpress;
index index.php;
}
求php的配置方法
下面应该怎么改
location ~ /discuz/*\.php$ {
root /data/html/discuz;
fastcgi_pass 192.168.1.25:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /wordpress/*\.php$ {
root /data/html/wordpress;
fastcgi_pass 192.168.1.26:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}