Web服务需要可通过网站访问
我有一个 .exe 程序,它有一个在端口 800 上运行的嵌入式 Web 服务。 程序执行后,我可以通过 127.0.0.1:800 在本地访问它。
我需要能够发送服务命令,例如:* 127.0.0.1:800/dev * 将获取附加到程序的设备列表。
据我所知,我需要在路由器上转发端口 800,然后从外部访问我的互联网 IP,我应该能够查看/访问此 Web 服务?我说得对吗?
然后我想创建一个 PHP 站点,它将所需的命令发送回我的家用电脑上运行的 Web 服务。
任何帮助将不胜感激。
I have a .exe program which has an embedded webservice running on port 800.
I can access it locally via 127.0.0.1:800 just fine once the program is executed.
I need to be able to send the service commands such as: * 127.0.0.1:800/dev * will get a list of devices attached to the program.
To my knowledge i need to forward port 800 on my router and then access my internet IP externally and I should be able to view/access this web service? am i correct?
I am then wanting to create a PHP site which will send the desired commands back to the web-service running on my home pc.
Any help will be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您只需将端口转发到端口 800 上的计算机本地 IP 地址即可。但请注意向公众开放端口的相关风险。您可能希望限制(如果您的路由器可以)仅从某些已知的 IP 地址进行访问。
Yes, port forward to your machines local IP address on port 800 should be all you need to do. Be aware though of the associated risks of opening ports up to public access. You may want to restrict (if you can on your router) access from only certain known IP addresses.