Solved

Subsite on a different server to main site can this be done

Posted on 2011-03-17
8
532 Views
Last Modified: 2012-05-11
Hi,

I want to know whether i can have www.somesite.com point to server1 (linux)
and www.somesite.com/estore point to server2 (windows)

So both have the same FQDN but the subsite goes to a different server.
eg i want to split my main site and my ecommerce site between 2 servers

Is this possible?
0
Comment
Question by:adammet04
[X]
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
  • 5
  • 2
8 Comments
 
LVL 9

Expert Comment

by:tanujchandna
ID: 35163088
Hi,

There can be two method

1. Set the redirection on www.somesite.com/estore website to windows
2. create subdomain with name estore.somesite.com on windows and point its DNS A record from Linux to windows in DNS Zone file.
0
 
LVL 6

Expert Comment

by:de2Zotjes
ID: 35164526
From your question it is not completetly clear what you want to accomplish. Do you want 2 separate servers to be accessible directly under 1 name? Or do you want to create a config so that end-users of your website will not notice that when they request a page from estore it is actually handled by a different machine?

case 1 is impossible

case 2 can be done using mod_proxy extension to apache http server.
0
 
LVL 3

Author Comment

by:adammet04
ID: 35169162
de2Zotjes

this is where i am getting confused, because i have been told it is possible technically for option 1

eg:

www.somesite.com -> server1 hosting this site
www.somesite.com/shop -> server 2 hosting this site.

the above is exactly what i want, but i am not sure if it is possible.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:adammet04
ID: 35169368
The reason primarily is because the main website is linux hosted. but our ecommerce site is windows based solution.
0
 
LVL 3

Author Comment

by:adammet04
ID: 35185639
de2Zotjes can you provide some information on how the mod_proxy extension would work, (not just links to other websites, but an actual example?)
0
 
LVL 6

Accepted Solution

by:
de2Zotjes earned 500 total points
ID: 35193442
When you were told that option 1 I mentioned is possible, people must have been using a different definition of site. When I say site I mean the collection of webpages a user can reach via a single hostname. A hostname is the part of the url following the double forward slash and before the first single slash. So you "violate" my (and the general) notion of site when you use this idiom:
  www.somesite.com -> server1 hosting this site
  www.somesite.com/shop -> server2 hosting this site

The reason you group a site on a hostname is that the client will resolve the hostname to an ip address and send a request for a page to that ip address. So ALL requests mentioned by you in the above example will go to the same ip address. That is why I said you can not have 2 separate servers available under one name.

The method to use is to pass on the requests for the shop/ part to the windows machine. This means the windows machine must be reachable from the linux box running apache, it need not be reachable from the internet!

Below are config directives needed to make this work in apache
# your path may be different
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so

# the way you have set up vhosts can be different..
<VirtualHost www.somesite.com:80>
  DocumentRoot /var/www/somesite
  ProxyPass /shop http://windows.machine/shop
  ProxyPassReverse /shop http://windows.machine/shop
</VirtualHost>

Open in new window


The config needs to contain lots more to make apache work, but these are the basic items needed to setup the type of reverse proxy you need for this job.
0
 
LVL 3

Author Closing Comment

by:adammet04
ID: 35195361
Thankyou, this confirms and works as we wanted it to. we just needed to set the settings correctly in apache.
0
 
LVL 3

Author Comment

by:adammet04
ID: 35195364
Apologies my terminology was incorrect!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

752 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