After installing and setting up Ikiwiki on my Debian server. I somehow got the following error when trying to edit index page in browser / online:

Not Found

The requested URL /foobar.com/static/ikiwiki.cgi was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

My foobar.setup has the following for CGI configuration

cgiurl => 'http:/foobar.com/static/ikiwiki.cgi',                                                                                                                          
cgi_wrapper => '/home/foobaruser/foobar.com/static/ikiwiki.cgi',

What could be wrong?

Well, your cgiurl is an invalid url (valid urls start with "http://" , not "http:/")

Perhaps you also have a misconfigured web server. You don't say if /home/foobaruser/foobar.com/ is configured to be served up for foobar.com. Or perhaps you need to follow the instructions in dot cgi.

Or, perhaps /home/foobaruser/foobar.com/static/ikiwiki.cgi does not exist; did you run ikiwiki -setup?

Comment by joey Fri May 20 09:56:51 2011

Here is a simple CGI script:

#!/bin/sh
printf "Content-type: text/plain\r\n"
printf "\r\n"
printf "Hello, world!\r\n"

Here is a simple Perl CGI script:

#!/usr/bin/perl
print "Content-type: text/plain\r\n";
print "\r\n";
print "Hello, world!\r\n";
Comment by smcv Sat May 21 14:27:15 2011

After testing using a test CGI script (thanks to smcv), I confirmed this is not a problem of the server not being set up to serve CGI. I then tried changing the permissions of ikiwiki.cgi and found:

  • on the remote server, if I have -rwsr-sr-x for ikiwiki.cgi, the CGI features such as Preference and Edit buttons don't work, but if I set it -rwsr-xr-x, it works. The server is a Debian VPS.

  • in contrast, on my local LAMP server localhost, both permissions work

Any ideas?

Thanks!

Comment by lumeng.dev Sat May 21 15:11:27 2011
BTW, I use cgi_wrappermode => '06755' in my wiki.setup
Comment by lumeng.dev Sat May 21 15:36:19 2011