两个网站的server配置如下
server {
listen 81;
server_name localhost;
location / {
root /data/www/w1;
index index.aspx;
fastcgi_index index.aspx;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
}
}
server {
listen 81;
server_name localhost;
location / {
root /data/www/w2;
index index.aspx;
fastcgi_index index.aspx;
fastcgi_pass 127.0.0.1:9001;
include /etc/nginx/fastcgi_params;
}
}
启动fastcgi的命令如下:
sudo fastcgi-mono-server4 /applications=/:/data/www/w1/ /socket=tcp:127.0.0.1:9000
sudo fastcgi-mono-server4 /applications=/:/data/www/w2/ /socket=tcp:127.0.0.1:9001
两网站都能正常打开。我想如果两个server中 fastcgi_pass 都写成127.0.0.1:9000,相应启动命令的socket端口也都写成9000,会有什么影响?我自己测试的结果是:两server都写成9000后,只执行第一条w1的命令后,两个网站都能打开,没有执行w2那条命令。
nginx+fastcgi-mono-server我不熟,不知道这样做会有什么影响。tcp的监听端口要不要一致?