我在Mac上的nginx.conf有以下几行:
location /addPat { resolver 8.8.8.8; proxy_pass http://some_url:8080$request_uri; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
这是从运行Debian的同一networking上的一台机器上直接复制而来的。 没有区别。
但是,虽然该指令在Linux上完美工作,它不断返回我的Mac上的404; 和日志条目是这样的:
2014/05/12 17:04:35 [error] 437#0: *13 "/usr/local/Cellar/nginx/1.4.6/html/addPat/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /addPat/ HTTP/1.1", host: "localhost"
这是非常烦人的,因为当你期望它可以在所有平台上工作时,它似乎不一致。
这里有什么问题?