Using Host For HTTP Request

B

bobspero

I have a server that has access to two web sites that my users do not because of nat's. If I use response.sendRedirect("http://104.22.234.12"); the users will not be able to view the website but if when I run it on the serverit loads. How do I get the web page to open in a container using the server network to load the container?
 
J

Joerg Meier

I have a server that has access to two web sites that my users do not because of nat's. If I use response.sendRedirect("http://104.22.234.12"); the users will not be able to view the website but if when I run it on the server it loads. How do I get the web page to open in a container using the server network to load the container?

You would have to install some sort of proxy server on the server, that
isn't really a Java related issue. But if you do that, why not just change
the NAT settings to let the users access the server directly ?

You could of course write your own proxy software in Java, but it is likely
to be slower, less secure and in general less mature than simply using an
existing solution.

Liebe Gruesse,
Joerg
 
R

Roedy Green

You would have to install some sort of proxy server on the server, that
isn't really a Java related issue. But if you do that, why not just change
the NAT settings to let the users access the server directly ?

the other way to do it is to handle the problem at the application
level. Your server gets the info it needs from the others and
forwards it. The clients have no knowledge of the aux servers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,589
Members
45,100
Latest member
MelodeeFaj
Top