Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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 example.com.

* The www. should contain the main website (hosting site)
* every subdomain ex. customer1.example.com 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
add comment

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
add comment

Your Answer

 
discard

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