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 am trying to setup subdomains using apache VirtualHosts. What I got so far is:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName  www.domain.aa
    DocumentRoot    /var/www/html

<VirtualHost *:80>
    ServerName  wiki.domain.aa
    DocumentRoot    /var/www/html/wiki

This config works quite well, the subdomain shows up when typing wiki.domain.aa in the browser. Yet, only the first page shows up. Whenever the browser tries to load an url backed by the subdomain (for exmaple wiki.domain.aa/style.css) I get a file not found error ...

Has anyone got an idea what this is about?

Thank you very much in advance. Matthias

share|improve this question

Depends on the wiki software you are using. Most wikis require additional configuration like mod_rewrite to function. You need to supply more of the configuration & what tools you are using.

share|improve this answer
+1 Check .htaccess for possible URL rewriting rules. Otherwise, what is given above looks OK, providing there is a file located at /var/www/html/wiki/style.css (and the URL is not being rewritten). – w3d Aug 1 '10 at 20:55

Your Answer


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