0

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>

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

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

1 Answer 1

1

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.

1
  • +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).
    – MrWhite
    Aug 1, 2010 at 20:55

You must log in to answer this question.