从非本地网络访问服务器数据而无需端口转发 [英] Server data accessing from non local network without port forwarding

查看:105
本文介绍了从非本地网络访问服务器数据而无需端口转发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用XAMPP服务器,并且我的文件位于XAMPP的htdocs文件夹中。



我已使用移动热点连接到笔记本电脑。



我可以从另一个不在同一网络中的系统访问XAMPP文件夹中的文件吗,也可以通过互联网
从另一台计算机访问XAMPP文件夹中的文件

解决方案

是的,可以从外部网络访问Web服务器,具体取决于您当前的网络配置。



我认为有两种简单的解决方案适合您。


  1. 如果需要,请配置防火墙,在路由器设置中启用端口转发,以将端口80转发到运行XAMPP服务器的计算机的内部IP。

  2. 如果您所在的网络是您无法配置,建议您检出 ngrok.com ,这是一项服务,您可以为XAMPP服务器设置公共URL。当然,您可以从任何类型的网络访问互联网。

请注意,备选方案2对于公开开发服务器很有用,对于在生产环境中运行站点我不建议这样做。 p>

I'm using XAMPP server and I have my files in htdocs folder of XAMPP.

I had connected to my laptop using my mobile hotspot.

Can I access my files in XAMPP folder from another system which is not in same network i.e., can I access the files present in XAMPP folder from another another computer via internet without router only by mobile hotspot?

解决方案

Yes, it's possible to access the web server from an external network, depending on your current network configuration.

There are two simple solutions I think would suit you.

  1. Configure your firewall if needed, enable port forwarding in your router settings to forward port 80 to the internal IP of the machine running your XAMPP-server.
  2. If you're on a network in which you can't configure, I recommend checking out ngrok.com, which is a service where you can setup a public URL for your XAMPP-server. Works from any type of network, where you have internet-access, of course.

Note, alternative 2 is good for exposing a development-server, nothing I'd recommend for running a site in production.

这篇关于从非本地网络访问服务器数据而无需端口转发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆