Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Apache 2 on Debian server and I am trying to do dynamic subdomains based on dirnames. bind is configured corretly for wildcard dns entry.

For example:

There is this specific dir for www for user. Let it be /home/user/sites/nameofthesite/. Logs for that site are situated in /home/user/sites/logs/nameofthesite/.

Assuming that users will have more sites than homepage, it’s inconvenient to create for each user a seperate virtual host entry in the configuration file. That’s why I want to rewrite the nameofthesite to

I tried several of ways and I still cant do it. please help ;]

share|improve this question

migrated from Sep 24 '09 at 18:28

This question came from our site for professional and enthusiast programmers.

There are may ways to do it. Have you tried the methods described in this document Dynamically Configured Mass Virtual Hosting

share|improve this answer

Your Answer


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