简体   繁体   English

转发http请求

[英]forwarding http request

i hope to find out a solution to my issue. 我希望找到解决我问题的方法。

Here's my scenario: i have developed a web application using glassfish, my application actually work on http://localhost:8080/myapp . 这是我的情况:我已经使用glassfish开发了一个Web应用程序,我的应用程序实际上可以在http://localhost:8080/myapp I also bought a domain and associated with my public ip address. 我还购买了一个域并与我的公共IP地址相关联。 Note that my application is located on a virtual host (with another ip adresss), so i need to forward the request from the public ip address to the virtual host IP address . 请注意,我的应用程序位于虚拟主机上(具有另一个IP地址),因此我需要将请求从公共IP地址转发到虚拟主机IP地址。 How can i do that? 我怎样才能做到这一点? After the request has been forwarded to the correct IP address, i want to launch my application by using the domain name and not the ip adress, so i want to do something like this http://www.mydomain.it for start my app. 将请求转发到正确的IP地址后,我想使用域名而不是IP地址启动我的应用程序,因此我想执行类似http://www.mydomain.it来启动我的应用程序。

First of all, you need to make available the application to a public IP address (i believe you got that right using the virtual host). 首先,您需要将应用程序提供给公共IP地址(我相信您使用虚拟主机是正确的)。

Then you have to redirect the trafic from your domain to that public ip address where the application is available. 然后,您必须将流量从您的域重定向到该应用程序可用的那个公共IP地址。 This can be done in different ways depending on your domain provider. 根据您的域提供商,可以用不同的方法来完成此操作。 Some providers have a web interface to do this redirection, and some others not. 一些提供程序具有Web界面来执行此重定向,而另一些提供程序则没有。 Look what is available from the side of your domain provider 看看您的域名提供商可以提供什么

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM