]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/tips/dot_cgi.mdwn
import sys and sys.argv
[ikiwiki.git] / doc / tips / dot_cgi.mdwn
index fbc3d8bbc6784946fa9b638d9bc04dbc87e66c80..da55c1f1c9828ec9ec79ee5cfb78f948a8ff2a91 100644 (file)
@@ -26,6 +26,13 @@ configuration changes should work anywhere.
   Or, if you've put it in a `~/public_html`, edit
   `/etc/apache2/mods-available/userdir.conf`.
 
+* You may also want to enable the [[plugins/404]] plugin.
+  To make apache use it, the apache config file will need a further
+  modification to make it use ikiwiki's CGI as the apache 404 handler.
+  Something like this, with the path adjusted to where you've put the CGI:
+
+       ErrorDocument 404 /cgi-bin/ikiwiki.cgi
+
 ## lighttpd
 
 Here is how to enable cgi on [lighttpd](http://www.lighttpd.net/) and
@@ -45,6 +52,16 @@ Note that the first part enables cgi server wide but depending on default
 configuration, it may be not enough. The second part creates a specific
 rule that allow `ikiwiki.cgi` to be executed.
 
-**Warning:** I only use this on my development server (offline). I am not
-sure of how secure this approach is. If you have any thought about it, feel
-free to let me know.
+**Warning:** I only use this lighttpd configuration on my development
+server (offline). I am not sure of how secure this approach is.
+If you have any thought about it, feel free to let me know.
+
+## nginx
+
+* To run CGI under nginx, just use a FastCGI wrapper like [this one](http://technotes.1000lines.net/?p=23). The wrapper must be started somehow just like any other FastCGI program. I use launchd on OSX.
+
+## boa
+
+Edit /etc/boa/boa.conf and make sure the following line is not commented:
+
+    AddType application/x-httpd-cgi cgi