Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple machines using one address and port?

Status
Not open for further replies.

venkman

Programmer
Oct 9, 2001
467
US
I posted this in the apache group also, but I think it might be more applicable here:

I was wondering if there was a way to setup apache so that it forwarded requests for a certain directory to another machine.

The problem I am trying to solve is this: I have two linux boxes behind a gateway that ip-masquerades them at home. one pc serves my personal website and email, the other is for personal uses like surfing the web and experimenting with. I would like to access the second using webmin with ssl, and be able to access the first using ssl also (so that I can check my email). This would be easy to solve using port forwarding; however, my company blocks all connections that are not on 80 or 443, so both machines have to share 443. Assuming my web server is at I would like to be able to access webmin on the second machine by say typing in: and access my email on the first machine by typing .To do this I would need all initial requests to be forwarded to the first machine, and then if the request is for the directory /webmin/ they would then be masqueraded/forwarded to the second machine. Is there a way to do this?? What about using a different domain name instead .... so rather than it would be . Is there a way to setup a linux box as a gateway that forwards based on domain name as opposed to ip address? What about apache, can that be setup to do this?

-Venkman
 
Hmmmm, I'm not sure that can be done. Webmin runs all the time and waits for an http request on port 10000 or whatever you choose when setting it up. I don't know if it can be run/called the same way as a web page. You may have to go to webmin.com and see if they have a work-around for you. Is it out of the question for someone to open up a port for you?
 
yeah, there's no way the port is going to be opened up. someone in the apache group suggested reverse proxying. I'm not sure exactly how that works, so I'll have to look into it more.

-venkman
 
Since your two machines are behind gateway/firewall, you can use NFS (Network File System).
You can access other machine as your sub directory.
After that, you can hard link it to your root directory of your webserver.
Hope this helps ...

--
Mike FN
"8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Web Programmer."
 
actually, I think I got the answer I was looking for from the apache group. Apparently you can do a sort of fake mirroring using the proxypass directive in apache. It will then forward all requests for a certain directory to another machine, including port number. I haven't yet tried it, but I'm almost positive it will work (I think it was designed for the same type of situation I listed above... that is accessing two machines behind a nat firewall).

I had thought of the nfs (or samba) solution. I use this concept for serving mp3s on my personal machine through my web server machine (sorry I keep it password protected for legal reasons). However, I don't think this approach would work for anything beyond simple html as there would be no server side processing for the commands going over nfs (which is needed if I'm using webmin).

A friend of mine also recommended I take a look at , but this is really overkill for what I want to do.

here's the thread from the apache group: thread65-573872

-Venkman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top