gpt4 book ai didi

linux - 如何在同一台服务器上显示另一个端口网站的nginx 80数据?

转载 作者:太空宇宙 更新时间:2023-11-04 12:42:20 25 4
gpt4 key购买 nike

我有这个:

location /cloud/ {
proxy_pass http://localhost:8000;
}

但我在浏览器中看不到 url http://someipaddress/cloud/ http://someipaddress:8000的内容, 为什么? someipaddress:8000 - 效果很好。我也可以做 localhost:8000 的 wget 并且它有效。我做错了什么?

最佳答案

您想查看http://123.123.123.123:8000/的内容每当您将浏览器指向 http://123.123.123.123/somepath/ .

一个快速的解决方案是在“somepath”文件夹中创建一个文件“index.html”,其中的 iframe 占据整个浏览器视口(viewport):

<html>
<title>Redirecting</title>
<body>
<iframe src="http://123.123.123.123:8000/" width="100%" height="100%" style="padding: 0px; margin: 0px; border: 0px;"></iframe>
</body>
</html>

关于linux - 如何在同一台服务器上显示另一个端口网站的nginx 80数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39799373/

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