Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

CNAME based php hostingI have an application that lets users get a * account (ex. Now what I would like to do is give the user the option of being able to use their own subdomain to point to their page (ex. => I have setup the server and works as expected. I have added a CNAME entry for => (A record on my DNS server) but when I visit I automatically get redirected to The default behaviour when a site does not exist is to show a page saying "Site does not exist" without any redirections.

I can't seem to be able to figure out what is causing this. I have tried looking around to see what could possibly be causing this but I'm lost as to what to search for. I'm hoping I can get some guidance from this community.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I think you are missing the ServerAlias directive for the, it should look something like this;

<VirtualHost *:80>



basically, because apache doesn't recognise the as explicitly aliased to some NameVirtualHost it falls through to the default *:80 NameVirtualHost which is presumably

share|improve this answer
Turns out there was a syntax error in my httpd.conf I added ServerAlias * to my vhost and it seems to be working now. – Meisam Mulla Mar 6 '12 at 7:08

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.