0

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.

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

2 Answers 2

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.

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .