【发布时间】:2021-11-22 02:55:41
【问题描述】:
当我在本地主机上使用 curl 时它的工作。
root@ip-10-87-3-236:/etc/nginx# curl -o /dev/null -s -w "%{http_code}\n" http://localhost/ib
Output :
200
但是当我通过互联网连接到浏览器时,我得到了
Not Found
The requested resource was not found on this server.
nginx 配置:
server {
listen 80;
server_name localhost;
location /ib {
proxy_pass http://localhost:3000; #whatever port your app runs on
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
请在此处提供帮助或分享任何可能非常有用的文档
谢谢
【问题讨论】:
-
能够 curl localhost/ib 它将给出 200 但 127.0.0.1/ib 输出`
未找到 未找到
在此服务器上未找到请求的资源。
`无法理解请在此处帮助跨度>