Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have set up a private MoinMoin wiki, accessed through HTTPS, but I cannot get Basic HTTP Authentication to work on it. I have it working on another site, using a similar vhosts file, so I cannot figure out what I am doing wrong.

When accessing the site, the connection gets redirected to HTTPS, as intended, but there is no request for authentication credentials.

Nothing relevant seems to be appearing in the access log or error log either, which is strange. I am not sure if MoinMoin sites keep their own logs, but I have defined logs in the vhosts file.

<VirtualHost 00.00.00.00:80>
        ServerName wiki.mysite.net
        Redirect 301 / https://wiki.mysite.net
        CustomLog /var/log/apache2/access.log combined
        ErrorLog /var/log/apache2/error.log
</VirtualHost>

<VirtualHost 00.00.00.00:443>
        ServerName      wiki.mysite.net
        DocumentRoot    /var/www/mywiki/

        ### Serve static contents (images, javascript, css...) ###
        AliasMatch "^/moin_static[0-9]*/applets/FCKeditor/(.*)" "/usr/share/fckeditor/$1"
        <Directory "/usr/share/fckeditor/">
                Options None
                AllowOverride
        </Directory>

        # The path to static contents changes (named after moinmoin version).
        AliasMatch "^/moin_static[0-9]*/(.*)" "/usr/share/moin/htdocs/$1"
        <Directory "/usr/share/moin/htdocs/">
                Options -Indexes -FollowSymlinks
                AllowOverride None
        </Directory>

        Alias /robots.txt /usr/share/moin/htdocs/robots.txt
        Alias /favicon.ico /usr/share/moin/htdocs/favicon.ico

        WSGIDaemonProcess mywiki user=www-data group=www-data processes=4 display-name=moin-wsgi-mywiki
        WSGIProcessGroup mywiki
        WSGIScriptAlias / "/usr/share/moin/server/moin.wsgi"
        # WSGIPassAuthorization On
        # Read: http://moinmo.in/HowTo/ApacheWithModWSGI

        <Proxy *>
                AuthUserFile    /var/www/.htpasswd
                AuthName        EnterPassword
                AuthType        Basic
                require         valid-user
                Order           Deny,allow
                Allow           from all
        </Proxy>
</VirtualHost>
share|improve this question
add comment

migrated from serverfault.com Aug 21 '11 at 8:47

This question came from our site for professional system and network administrators.

1 Answer

up vote 5 down vote accepted

Don't put auth directives inside a Proxy directive, put it inside a Directory directive for '/usr/share/moin/server'.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.