Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


2 servers = 1 apache or 2?

Posted on 2004-10-26
Medium Priority
Last Modified: 2010-03-04
I am working on a new FC2 box that will be splitting my websites and mail. But, I am a little confused about routing across my internal network.
I don't have a separate Proxy server ( yet ).

internet->Router-> (main server box)

on resides a current copy of Apache and ALL my websites and mail server. Now that I have a new server to add to my farm,, I want to route some websites that would be on 205 to 206.

would my httpd.conf file on list
<virtual host>

I am looking for the syntax to route from 205 to 206.

Also, Would\Could I run a second copy of Apache on 206? Would this conflict?
I'm asking because I may want to migrate my 206 box to be the prime point, ie router->, instead of the older 205

I hope I have been clear enough about what I am attempting.

Thanks, Frog
Curious by Nature,
Linux by Choice
Question by:DBA_Frog
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 15

Assisted Solution

samri earned 500 total points
ID: 12413165
hi Frog,

It would depend on how your existing websites is currently built.

I would presume that you had several websites, and each had their own Vhost defined as (you mentioned in the text).

So, you had

   ServerName  www.site1.com
   ServerName  www.othersite.com

... and the list goes on.

if this is the case, I would suggest that you built the apache on 192,168.0.206 to be identical as those on 205, and defined the vhost the same as those on 205, except the Vhost container now


And for those websites (on 205) that needs to be migrated, remove all directive, and replace it with the Proxy/ProxyPass directive

For example, if you want to move www.mysite.com from 205 to 206, then;

  ServerName www.mysite.com
  ProxyPreserveHost On
  ProxyPass               /   
  ProxyPassReverse   /   

Also good to enable ProxyPreserveHost to ensure that the request to Apache on 206 would still carry the "Host:" header for www.mysite.com, to ensure the Vhost matching is done correctly.

Some ref:


Accepted Solution

mrielf earned 500 total points
ID: 12413290
On machine do this:

Turn on Proxy_module in apache
                    LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so

Use VirtualHost section like this:

<VirtualHost x.x.x.x>
    ServerAdmin webmaster@server_on_206.com
    DocumentRoot /anything
    ServerName server_on_206.com
    ProxyRequests Off
    ProxyPass / http://server_on_206.com/
    ProxyPassReverse / http://server_on_206.com/
    ErrorLog /var/log/apache/server_on_206.com.log
    CustomLog /var/log/apache/server_on_206.com-access.log common

Insert server information to host file:      server_on_206.com

On Set up your servers....


Author Comment

ID: 12421594
Thank you both for the information.

mrielf: Once I load the module for Proxy_module, will that re-compile Apache?, I've read a little about modules in Apache and I want to make sure I don't have to do any additional steps after loading the module. Other than the obviouse reload of apache.

TIA for the info.

Expert Comment

ID: 12422396
Of course you don't need to recompile apache, just restart it... (or reload configuration)

Author Comment

ID: 12422548
Again, Thank you both for your answers. Since they were very similar I split the points between the two of you.

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question