Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: 2 apache environments, or 2 LAN IPs on 1 WAN IP, |
|
Author |
|
Sandlap
Joined: 27 May 2010 Posts: 4
|
Posted: Thu 27 May '10 16:35 Post subject: 2 apache environments, or 2 LAN IPs on 1 WAN IP, |
|
|
independently. I've successfully served multiple domains on a wamp environment with 1 LAN IP and 1 WAN IP and used the <virtualhost *:80> directive in the http.conf file with no problems and for some time now. I still have sites being served on this 1 LAN, lets call it .100:80, but now want to start serving on a second wamp environ that is a substantial upgrade from original wamp .100:80.
Nutshell: Serve sites using 2 LAN IPs 1 WAN IP on wamp(xp) in each LAN wamps.
1 WAN (static)
2 LAN IPs (static)
100:80
103:81
I've exhausted myself reading all of the on-line resources -- apache docs forums etc -- with zero success. It seems to me they are covering vhosts to define things assuming one is using 1 wamp eviron. I am utterly exhausted and even more confused and I'm sure it is simple. If I bought a 2nd WAN IP this would be a moot point, obviously, but I cannot afford to.
I do thank you in advance |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 27 May '10 17:57 Post subject: |
|
|
But, how are you directing the proper request to the proper LAN IP is the question since they are both coming on the 1 wan on port 80?
I am of course assuming you do not want a URL of http://some.domain.com:81 for one of them ... correct? I am also assuming these are two separate machines at the end of those LANs? Nutshell seems to infer this I think but I hate to assume. |
|
Back to top |
|
Sandlap
Joined: 27 May 2010 Posts: 4
|
Posted: Thu 27 May '10 18:36 Post subject: Your question is the question I am asking I think |
|
|
I want incoming requests to be properly directed to 1 of 2 LAN servers on 1 WAN. A redirect of sorts.
old sites 1-6 reside on lan 2, new and all future sites reside on LAN 2. I would have thought one could specify a port number, if need be, at the registrar level. Apparently not |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 27 May '10 19:12 Post subject: Re: Your question is the question I am asking I think |
|
|
Sandlap wrote: | at the registrar level. Apparently not |
Correct ... no you cannot.
I have no clue if there is a router that can separate by host headers, like the server does. If such a device does indeed exist, I'd imagine it would cost more than another IP for a couple years.
I'd have the more powerful box (say LAN2) answer all requests but proxy the old sites requests to/from LAN1.
http://newsites <---> WAN:80 <---> LAN2:80
http://oldsites <---> WAN:80 <---> LAN2:80 <--- proxy old sites ---> LAN1:80 or 81
This could be kind of a config nightmare though depending on the end server's (LAN1) config and LAN2 is pulling double-duty.
Only other option
http://allsites <---> WAN:80 <---> LAN2:80 ---> redirect old sites requests ---> WAN:81 <---> LAN1:81 or opposite
http://allsites <---> WAN:80 <---> LAN1:80 ---> redirect new sites requests ---> WAN:81 <---> LAN2:81
and forward port 81 to the appropriate LAN IP |
|
Back to top |
|
Sandlap
Joined: 27 May 2010 Posts: 4
|
Posted: Fri 28 May '10 7:37 Post subject: Sorry for the delay |
|
|
Finally making sense- thank you!
glsmith wrote: |
I'd have the more powerful box (say LAN2) answer all requests but proxy the old sites requests to/from LAN1.
http://newsites <---> WAN:80 <---> LAN2:80
http://oldsites <---> WAN:80 <---> LAN2:80 <--- proxy old sites ---> LAN1:80 or 81
|
This was your first option so this will be best? All sites will ultimately be on the upgrade (old box Pentium II, new box Phenom II X4) as soon as they can afford downtime and will be new installs. This may remedy the complexity worries.
I am only missing the proxy then. So only one question I dare to ask is: How to proxy Pentium II content requests via Phenom Box?
Thanks again! |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 28 May '10 17:10 Post subject: |
|
|
No, first is not the best, or is depending on how you look at it. Second is easier, and if you're going to move them to the new server why not just do it now, be done with it, and there's no need for either the two.
As far as how to do the first option. You are going to have to do some reading. A good start would probably be
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html. |
|
Back to top |
|
Sandlap
Joined: 27 May 2010 Posts: 4
|
Posted: Sat 29 May '10 7:32 Post subject: I totally agree |
|
|
swap all on over now and be done with it- I've got 4 new sites waiting on my upgrade. I will though want to learn this regardless, not to mention many others that I presume want to learn this as well. One day I hope to have many lan boxes taxed with client websites and quit my real job. Sigh
Mod proxy docs is my start? I do thank you as you have helped me and most likely many others! |
|
Back to top |
|
|
|
|
|
|