Solved

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

Posted on 2011-03-17
8
510 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
  • 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
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now