Solved

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

Posted on 2011-03-17
8
519 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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