oscartheduckin’ around

February 27, 2007

Moin on Apache on OpenBSD

Filed under: apache, how to, moin, MoinMoin, openbsd — oscartheduck @ 3:41 pm

This one hasn’t been as bad as it could have been.

For some reason, python’s internal networking stuff hasn’t been wroking properly since day one on moin for me. Some computers can access the wiki in firefox but not internet explorer, some are fine and some have no chance at all. So I decided it was time to bite the bullet and throw the whole thing into Apache.

Apache is built into OpenBSD. This makes some things really nice, like not having to install and configure the sucker. However, as it’s built in and as it’s OpenBSD, there are massive security precautions that have been taken. They state in the OpenBSD documents that security and ease of use are often incompatible goals, a harsh warning that is maybe a little too strong.

First, read this and read it again: http://moinmoin.wikiwikiweb.de/HelpOnInstalling/ApacheOnLinux

The paths in OpenBSD are different. It stores Apache in /var/www/, but it’s turned off by default. To turn it on, there are two tricks; either claims to work. The first is to create a file called /etc/rc.conf.local and add the line to activate apache, which is httpd_flags=”” – see http://www.openbsd.org/faq/faq10.html#httpdchroot

The other is to edit /etc/rc.conf directly. For whatever reason, my override file didn’t seem to want to work properly, so I edited rc.conf directly. I’m going to revisit this, though, and get the override file working eventually.

Go ahead and follow the instructions for apache on linux that I linked earlier on. I put the Alias and ScriptAlias in section 2 of httpd.conf

Now, the first thing you’ll notice is that the fucking thing doesn’t work. This document gives a good idea why: http://www.openbsd.org/faq/faq10.html#httpdchroot

The chroot environment prevents apache from seeing outside of its own directories. Grand. So, what’s the solution? Well, right now my solution is to turn the chroot off. This isn’t ideal, but it works reasonably well. Simply add the -u flag to the line in rc.conf or rc.conf.local, thus: httpd_flags=”-u”

That’ll get things up and running. I found that I had a shit ton of path issues after that. Simply tail-f /var/ww/logs/error_log and keep accessing your wiki from a browser. You’ll see errors crop up; fix them as they appear and everything should be tickety boo.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: