apache blocking moinmoin wiki (permissions)

Hiya,

I’m having some problems setting up a python wiki on a fresh install of opensuse11.0 (fully updated) running apache2.2 .

Head to
http://www.h2j9k.org/wiki/
and you will see my problem. I have configured moinmoin exactly as described at
MoinMoin/InstallDocs - 1.8 Master Wiki

and I have set up permissions in every directory I think might need it (the instance directory, the “static” stuff in usr/share, the python library folder.).

Global read-write permissions (chown -R wwwrun.www, chmod -R 0777) no less!

and yet, apache still complains that I don’t have access. The error is the same when accessing at 127.0.0.1, the local LAN socket (a 192 address) OR the domain name.

I have added the appropriate Alias and ScriptAlias for a cgi-based install using the Apache HTTPServer GUI in Yast2 (the advice is to get this working before trying WSGI for the final config).

This has ScriptAlias /wiki/ pointed at “/instance/cgi-bin/moin.cgi” as required, which is in one of the directories marked with global rwx.

any suggestions as to possible problems would be greatly appreciated.

Cheers,

Joe

Hi Joe,

I don’t think it has to do with your chmod permissions. Look in your Apache config files… It seems like the directory you are trying to access is blocked by your apache config.

You should have a document root and directory section:

DocumentRoot /var/www/htdocs

<Directory /var/www/htdocs>
        AllowOverride All
        Options All
        Options +FollowSymLinks
</Directory>

Check the AllowOverride option. Try changing it to All instead of None. The Suse default is None, but the Apache default is All… I think. Make sure that the directory you are trying to access is below document root. As in the wiki directory above should be in something like:

/var/www/htdocs/wiki

If it’s above, as in

/var/www/wiki

…it won’t work.

/jlar

Hiya jlar,

If you put it below doc root it will work, but that’s not the idea!

If you read the description of the MoinMoin setup, you need to have your underlay and data directories /hidden/ from public view (the wiki itself is just a ScriptAlias to a moin.cgi; there isn’t a database, just a bunch of text files… which you don’t want people to see!) and also the static docs pages are stored in /usr/local/share after a normal install…

You are supposed to be able to give apache permission to look in these directories somehow, but apparently I can’t find out how!

Thanks for the reply, but I’m still stuck I’m afraid…

Joe

By the way, this is now resolved (although the links mentioned originally are currently down for other reasons).

The problem was missing Directory declarations along the lines of:


<Directory /var/www/htdocs>
        AllowOverride All
        Options All
        Options +FollowSymLinks
</Directory>

for each relevant directory.

It was simplest to add them to a wiki.conf in /etc/apache2/vhosts.d/, since this did not require any changes to YAST2’s files (that it would notice); thus meaning that the changes persisted after using the GUI to reconfigure other webserver behaviour (e.g. renaming aliases to correct missing / extra trailing slashes).

An appropriate conf.local would have also worked, but would have produced YAST warnings about possible override later.

Thanks to eeijlar for the helpful comments.

Joe