Solved

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

Posted on 2011-03-17
8
524 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
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: 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

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 …
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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