My ultimate goal is to setup ikiwiki, my current goal is to get a fcgi wrapper working for nginx, so I can move on to the next step...
The ikiwiki page points out this page as an example for a fcgi wrapper:
http://technotes.1000lines.net/?p=23
So far I've installed the ikiwiki and libfcgi-perl modules through aptitude:
aptitude install libfcgi-perl
aptitude install ikiwiki
It installed those packages as well as some minimal dependency packages.
So the next step following the guide at technotes, I grabbed http://technotes.1000lines.net/fastcgi-wrapper.pl but I'm not sure where to actually place this file... do I run it as a service?
The script makes a socket file in /var/run/nginx but that directory does not exist.. do I manually create it?
So in addition to the .pl file for the cgi wrapper, I need to also define a separate cgi file for parameters. If my conf looks like this...
server {
listen 80;
server_name notes.domain.org;
access_log /www/notes/public_html/notes.domain.org/log/access.log;
error_log /www/notes/public_html/notes.domain.org/log/error.log;
location / {
root /www/notes/public_html/notes.domain.org/public/;
index index.html;
}
}
And I don't have a cgi-bin directory, where exactly should I create it within my structure, and regarding that I'd obviously have to update the below before I include it in my conf, but I'm just not exactly sure how this would work out.
# /cgi-bin configuration
location ~ ^/cgi-bin/.*\.cgi$ {
gzip off;
fastcgi_pass unix:/var/run/nginx/perl_cgi-dispatch.sock; [1]*
fastcgi_param SCRIPT_FILENAME /www/blah.com$fastcgi_script_name; [2]*
include fastcgi_params; [3]*
}
Also since the user is www-data and /var/run
is root owned, what's the proper way of giving it access?
Any tips appreciated.
you should install fcgiwrap via apitude. worked out of the box.
most of the nginx tutorials suck, because they are either not debian-specific, try to reinvent the wheel or use old software or configuration. so be careful and read a bit more than usual.
fyi, my cgi location block:
the /etc/nginx/fastcgi_params
the ikiwiki stuff goes in /usr/lib/cgi-bin, you can reach it via http://server/cgi-bin/