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

I want to setup an specific environment for my hostings, but don't know what's the best approach.

I want have a domain called

* The www. should contain the main website (hosting site)
* every subdomain ex. needs to be redirected to a subfolder

I don't know what is the best approach. Having an virtualhost for every customer or having one virtualhost for the service and redirect using mod_rewrite? I'm currently setting up this environment local, so if you have an good idea plase don't forget to mention the hosts file.

Everything should be automatically generated and on the fly included.

Kind regards, Ward

share|improve this question

1 Answer 1

Seems like you're looking for mod_vhost_alias.

share|improve this answer
are there other options instead putting it in database ? – Ward Jul 4 '10 at 14:04
mod_vhost_alias doesn't use any database. – joschi Jul 4 '10 at 14:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.