Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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've never had this problem before, but I'm sure it's something I'm doing wrong.

I just set up another virtual host on Debian with Apache, and I'm trying to get it directed to the MediaWiki installation, but whenever I try to pull up it gives me which gives me a 404. It should be directing me to which does work if I put that in.

Here's what I put in for the conf file:

<VirtualHost *:80>
    DocumentRoot "/var/lib/mediawiki/"
    # Uncomment this to add an alias.                                                                                                        
    # This does not work properly with virtual hosts..                                                                                       
    #Alias /mediawiki /var/lib/mediawiki                                                                                                     

    DirectoryIndex index.php

    RedirectMatch permanent / index.php                                                                                                      

    RewriteEngine On
    RewriteRule (.*) /var/lib/mediawiki/$1

    <Directory /var/lib/mediawiki/>
        Options +FollowSymLinks
        AllowOverride All
        order allow,deny
        allow from all

    # some directories must be protected                                                                                                     
    <Directory /var/lib/mediawiki/config>
        Options -FollowSymLinks
        AllowOverride None
    <Directory /var/lib/mediawiki/upload>
        Options -FollowSymLinks
        AllowOverride None
share|improve this question
adding access_log entries would help, plus did you check for .htaccess files in /var/lib/mediawiki? – fuero Jan 20 '13 at 23:17
There's no .htaccess file in that directory. access_log doesn't output anything when accessing the website, but error_log does, but it's just basically this: File does not exist: /var/lib/mediawiki/defaultsite. – supercheetah Jan 21 '13 at 0:08
Short of using tcpdump and wireshark to figure out what exactly is happening here I'm out of ideas. Redirects (301/302) and File not found (404) usually show up in access_log. Perhaps you are accessing the wrong vhost somehow. apache2ctl -S will list all defined vhosts + hostname. – fuero Jan 21 '13 at 0:18
Actually, you're right, I was looking at the wrong access log file. When I try to access / it gives me "GET /defaultsite HTTP/1.1" 404 507 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0" – supercheetah Jan 21 '13 at 1:53
The manual usually helps. – Nemo Apr 5 '15 at 21:59

Your Answer


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

Browse other questions tagged or ask your own question.