简体   繁体   English

如何在 VPS 上将我的本地主机转发到我的公共 IP?

[英]How can I forward my localhost to my public IP on a VPS?

I'm running a website on my Linux VPS.我在我的 Linux VPS 上运行一个网站。

This is what I get on my terminal when the website is running:这是网站运行时我在终端上看到的:

Navigate to https://127.0.0.1:7443 in a browser

The problem is that I cannot connect to this on the browser because it's not MY machine's localhost.问题是我无法在浏览器上连接到它,因为它不是我机器的本地主机。

Is there a way I can forward this to my VPS's Public IP?有没有办法可以将其转发到我的 VPS 的公共 IP?

for example, the IP address I use to access the server?比如我用来访问服务器的IP地址? To explain better I want to access the website from anywhere from my phone, laptop, etc.为了更好地解释,我想从我的手机、笔记本电脑等任何地方访问该网站。

You could possibly use iptables/firewalld such as port recirection你可以使用 iptables/firewalld 比如 port recirection

What you are probably searching for is one of these tools:您可能正在寻找的是以下工具之一:

These tools will let you access your local page from anywhere in the world.这些工具可让您从世界任何地方访问您的本地页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将容器上的本地主机端口转发到主机上的本地主机? - How can I forward localhost port on my container to localhost on my host? 如何在我的 VPS 后台运行我的 python 脚本 - How can i run my python script in the background in my VPS 我怎样才能从python程序中找到我公众面对的ip而不是代理 - how can i find my public facing ip from python program not proxy 如何在shell脚本中获取公共IP地址? - How do I get my public ip address in a shell script? 如何在我的 VPS 服务器 (hostinger) 中更改我的 DocumenRoot? - How do I change my DocumenRoot in my VPS server (hostinger)? 如何将旧站点从共享主机服务器移至VPS? - How can I move my old sites from shared host server to VPS? 我如何知道要在我的 VPS 上安装哪个 Chrome 二进制文件? - How do I know which Chrome binary to install on my VPS? 如何使用docker inspect找出我的IP - How can I use docker inspect to figure out my IP 我的Ip动态变化如何获取最新的IP? - My Ip changes Dynamically How can I get updated with the latest ip? 在查询在我的计算机上本地运行的DNS服务器时,如何使dig使用非localhost的源IP? - How do I make dig use a source IP other than localhost while querying a DNS server running locally on my machine?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM