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.

I'm stuck on what more I need to do, but here's what I'm trying to do..

I want static.domain2.net to redirect it's content to domain1.com. I'm trying to parallel my site's static files for faster speeds. So I say I have the file domain1.com/test.gif I want static.domain2.net/test.gif to load domain1.com/test.gif.

Here's what I've done so far..

I've added a CNAME entry in domain2.net's DNS. It points "static.domain2.net." as a CNAME for "www.domain1.com.".

However, when I go to the static.domain2.net site it loads a default apache page. You can see the actual domains here..

static.domain2.net -> http://static.vgcdn.net

domain1.com -> http://vilegaming.com

I've checked other StackOverflow questions and couldn't find a complete answer.

share|improve this question

migrated from stackoverflow.com Dec 21 '09 at 23:13

This question came from our site for professional and enthusiast programmers.

I'd recommend checking other ServerFault questions instead, you're unlikely to find things about DNS entries on StackOverflow. –  Dav Dec 21 '09 at 18:05

2 Answers 2

If you have configured your apache to use name based virtual hosts (look for something like "NameVirtualHost *:80" in the config) you need to create a host with either ServerName or ServerAlias set to your CNAME.

Look here for a sample config of name based virtual hosts...

I think this belongs to one of the sister sites of stackoveflow.

share|improve this answer

Add e.g. ServerAlias static.domain2.net to the VirtualHost-directive of domain1.com.

share|improve this answer

Your Answer


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.