gpt4 book ai didi

http - 尝试使用 ngrok 服务器时出现 404 NOT FOUND 错误

转载 作者:行者123 更新时间:2023-12-05 07:23:54 24 4
gpt4 key购买 nike

我目前正在使用 webstorm 对我的网页进行编程,当我通过 Google chrome 打开它并在本地托管时,浏览器使用的 url 是

http://localhost:63342/assignment2/statichtmlpage-edit.html?_ijt=nqejipcmjnaun1b1416leu6a2i

当我打开终端以将其托管在 ngrok 上时,我输入 ./ngrok http 63342然后打开一个窗口,其中包含我可以使用的 ngrok url但是当我转到那个 URL ( http://4038e733.ngrok.io ) 时,我得到的只是一个 404 NOT FOUND 错误。

我不知道为什么会这样,任何帮助将不胜感激

Terminal screenshot

最佳答案

使用完整 URL 访问您的页面:

http://4038e733.ngrok.io/assignment2/statichtmlpage-edit.html?_ijt=nqejipcmjnaun1b1416leu6a2i

http://4038e733.ngrok.io/ 页面之后添加您的网络 (.html) 文件路径。


您从根目录 http://localhost:63342/ 托管,但忘记指向文件。所以正如预期的那样,错误:

GET /           404 Not Found

是说根目录下没有文件。

我想大多数用户的解决方法是将 /index.html 附加到他们的 ngrok 链接的末尾:

http://ngrok.io/ ... /index.html

关于http - 尝试使用 ngrok 服务器时出现 404 NOT FOUND 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55679962/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com