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

You've seen it done on sites like where you would have

I'm wanting to do a similar thing, any subdomain is routed through to the same index.php file.

so will request /home/some/path/to/www (in here is index.php) and will request the same file

I have it working locally, but my server uses cPanel. What would be your guess at the apache conifguration?

share|improve this question

1 Answer 1

up vote 1 down vote accepted
<VirtualHost *:80>
    DocumentRoot  /home/some/path/to/www 
    ServerAlias *

Something like that, perhaps?

share|improve this answer
worth noting that you'll also need wildcard DNS – James L Aug 12 '10 at 14:06

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.