how to set up the ikiwiki bliki CGI

Posted on March 28, 2010. Filed under: admin, blogging, Debian, HowTo, sys admin, web server, wiki | Tags: , , , , , , , , , , , , , , , |

Now, we’re almost done. This is the second last post in this series of posts. It is about configuring Cherokee so we can edit the bliki using the web frontend.

First, we become root and make a backup copy of the cherokee config file and launch the Cherokee admin tool:

$ su
# cp /etc/cherokee/cherokee.conf /etc/cherokee/cherokee.conf.orig
# cherokee-admin

Then we direct a JavaScript capable browser to localhost:9090 and leave it at that for a moment.

In an other shell we set up the ikiwiki CGI. (While playing around with the existing setup it turned out that we cannot have the CGI in ~/public_html/bliki, so we overrule part of the old setup.)

First, create a common ~/public_html/cgi-bin, then edit the ikiwiki config file to reflect that.

$ mkdir -p ~/public_html/cgi-bin
$ emacs -nw ~/.iki-test/ikiwiki.setup
$ cd ~/.iki-test/ && diff ikiwiki.setup  /usr/share/doc/ikiwiki/html/ikiwiki.setup && cd
14,15c14,15
<       srcdir => "/home/dagobart/.iki-test/bliki/s",
<       destdir => "/home/dagobart/public_html/bliki",
---
>       srcdir => "/path/to/source",
>       destdir => "/var/www/wiki",
17,18c17,18
<       url => "http://localhost/~dagobart/bliki",
<       cgiurl => "http://localhost/~dagobart/cgi-bin/ikiwiki.cgi",
---
>       url => "http://example.org/wiki",
>       cgiurl => "http://example.org/wiki/ikiwiki.cgi",

As we’re at it, at the same time tell ikiwiki to make use of the CGI and where to find it [continuation of the above diff]:

63,69c63,68
<               {
<                       # The cgi wrapper.
<                       cgi => 1,
< #                     wrapper => "/var/www/wiki/ikiwiki.cgi",
<                       wrapper => "/home/dagobart/public_html/cgi-bin/ikiwiki.cgi",
<                       wrappermode => "06755",
<               },
---
>               #{
>               #       # The cgi wrapper.
>               #       cgi => 1,
>               #       wrapper => "/var/www/wiki/ikiwiki.cgi",
>               #       wrappermode => "06755",
>               #},

Now, make ikiwiki aware of these changes and return to the [user's] home directory (the trailing && cd):

$ cd ~/.iki-test/ && ikiwiki -setup ikiwiki.setup && cd

Now, back to the dangling end of the open browser window with the Cherokee admin tool in it. Direct your browser to http://localhost:9090/vserver either by entering that URL to the browser’s address bar or by just clicking the link here.

As the Cherokee admin web tool makes a lot use of JavaScript, I cannot give immediate URLs where to set up what. Hence, instead, I guide you there starting with/from the http://localhost:9090/vserver page yet mentioned above.

For quicker reading, I introduce a kind of guidance syntax here: a single > — like in Virtual Servers > Virtual Server List — means: On page/In the area labeled “Virtual Servers” look for an item labeled “Virtual Server List”.

Opposed to that, by a >> I refer to an action: menu >> Virtual Servers for example refers to: look at the menu, then click “Virtual Servers”.

Increasing amounts of asterisks at the beginning of a line refer to the depth/nesting you’ll face, like in

menu >> Virtual Servers
* Virtual Servers > ...

This tells you: Once you hit the “Virtual Servers” link in the menu, you’ll be down one level into it, facing a new page calles “Virtual Servers”.

So, the following guide should be pretty easy to read (if not: ask!). It is about making ~/public_html directories become places where you can put HTML content and ~/public_html/cgi-bin the location your ikiwiki CGI goes (or any other for that matter):

menu >> Virtual Servers
* Virtual Servers > Virtual Server List >> default
** Virtual Server > default >> Personal Webs
*** Personal Webs > Directory name: public_html
*** button at end of page
*** Personal Webs > Add new rule > Rule Type: Directory
*** Personal Webs > Add new rule > Web Directory: /cgi-bin
*** button at end of page
*** default – Directory: /cgi-bin > Handler > Handler: CGI
*** button at end of page
*** default – Directory: /cgi-bin > default
*** button at end of page
* Apply

Then. to verify everything went well, direct your browser to a URL your ikiwiki maintains: http://localhost/~dagobart/cgi-bin/ikiwiki.cgi?do=prefs. — If you get a form page — e.g. a login page –, everything went okay (not okay if you get asked whether you’d like to download ikiwiki.cgi).

Interrupt cherokee-admin now, we don’t need it any longer.

Then, there’s only one last step to perform to finish this distributed setup of an ikiwiki bliki.

Advertisement

Make a Comment

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 )

Connecting to %s

Liked it here?
Why not try sites on the blogroll...

Follow

Get every new post delivered to your Inbox.