URL redirect to a virtual server on a VLAN

Posted by zeroFiG on Server Fault See other posts from Server Fault or by zeroFiG
Published on 2011-02-17T12:51:00Z Indexed on 2011/02/17 15:27 UTC
Read the original article Hit count: 318

I have a production site, running off 10 servers. I've been given another virtual server on the same network as these 10 servers, to use for testing purposes. This server doesn't have it's own DNS entry. Therefore I need to do a redirect to the site hosted on this virtual server for a sub-domain of the site running on the 10 other servers.

So Basically I was wondering how I would configure a sub domain of my production server to point at the Virtual server for testing.

I'm guessing I need to modify my site file in

/etc/apache2/sites-available

and add another virtual host like the following and modify the redirect match:

<VirtualHost *>
        ServerName SUBDOMAIN.DOMAIN.com
        RedirectMatch 301 (.*) **IP ADDRESS**
        CustomLog /var/log/apache2/SUBDOMAIN.DOMAIN.com.access.log combined
</VirtualHost>

Do I set the redirect match to just the IP on the Virtual server, and then configure another site file in the sites-available directory, which will recption this redirect and point the browser towards the HTML root?

Thanks, I hope I made myself clear.

© Server Fault or respective owner

Related posts about apache2

Related posts about virtualization