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

share|improve this question
add comment

1 Answer

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

Your Answer

 
discard

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