ich mein PHP-Projekt als Web-Server in der Maschine A eingesetzt, nginx und FastCGI verwenden und die Konfigurationsdatei ist wie folgt:
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;
}
so, wenn ich ein 'GET' machen Anfrage von meinem lokalen Rechner als:
curl http://alpha.kimi.com/app/redirect/taskpush?build=10&gcdata=1
es wird json zurück
{"res":200,"msg":"success","extra":[]}
Aber als ich die gleiche Anfrage in der Maschine A machte, erhängte sie sich dort und gab nichts zurück. Ich habe auch versucht:
curl http://localhost/app/redirect/taskpush?build=10&gcdata=1
und
curl http://localhost:9000/app/redirect/taskpush?build=10&gcdata=1
alle nicht funktioniert. Ich weiß nicht, was das Problem ist.
Siehe http://stackoverflow.com/questions/11061788/correct-configuration-for-nginx -to-localhost und http://stackoverflow.com/questions/13634574/how-to-make-nginx-to-listen-to-server-nameport –
Wie sind Sie am Ende damit gegangen? –