Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We are about to move a website to a new server running a new piece of software, normally a simple change but we also have a dutch version of the website running in a folder /nl.

We would like to transfer the domain www.example.com to point towards the new server but any requests made to /nl and within will be diverted to dutch.example.com. Here is what we have so far.

    ProxyRequests Off

    <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>

    ProxyPass /nl http://dutch.example.com/nl
    ProxyPassReverse /nl http://dutch.example.com/nl

It becomes more complicated because images for the dutch site are mixed with the images for the current UK site, these images will no longer exist on the new site. So we also need any /assets requests to be dealt with by the proxy. On top of all this, its an ecommerce website so it should be possible for all this to happen over SSL.

Is this possible?

Your help is very much appreciated

share|improve this question

1 Answer 1

Assuming you have Apache as frontend and the English site and Dutch site as backend, try something like this:

    NameVirtualHost *:80

    <VirtualHost *:80>
        ServerName multilanguage.example.com
        <Location /nl>
                ProxyPass http://dutch.example.com/nl
                ProxyPassReverse http://dutch.example.com/nl
        </Location>
        ProxyPass / http://eng.example.com/
        ProxyPassReverse / http://eng.example.com/
    </VirtualHost>

This configuration will

  • If multilanguage.example.com is entered it will proxy to eng.example.com
  • With multilanguage.example.com/nl it will proxy to dutch.example.com/nl

You can easily add the SSL configuration by taking a look at ssl.conf file.

share|improve this answer
    
Hi, What is I want to say map all paths such as dutch.example.com/all/such/paths/bla/bla/bla via this method -- would appreciate it if you take a look at my question here serverfault.com/questions/440024/… –  user1172468 Oct 18 '12 at 22:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.