【发布时间】:2016-03-28 20:47:16
【问题描述】:
情况:
我在A机上部署了我的php项目作为web服务器,使用nginx和fastcgi,配置文件如下:
server {
listen 80;
server_name alpha.kimi.com;
index index.html index.htm index.php;
root /alidata/www/;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location / {
root /www/admin/;
index index.php;
if (!-f $request_filename){
rewrite ^/(.+)$ /index.php?$1& last;
}
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log /data/log/nginx/access/output.log;
error_log /data/log/nginx/access/error.log;
}
所以当我从本地机器发出“GET”请求时:
curl http://alpha.kimi.com/app/redirect/taskpush?build=10&gcdata=1
会有json返回
{"res":200,"msg":"success","extra":[]}
但是,当我在机器 A 上发出相同的请求时,它就挂在那里,什么也没返回。我也试过了:
curl http://localhost/app/redirect/taskpush?build=10&gcdata=1
和
curl http://localhost:9000/app/redirect/taskpush?build=10&gcdata=1
一切都不起作用。我不知道是什么问题。
【问题讨论】: