Installing ikiwiki on nginx - fastcgi/fcgi wrapper

Posted by meder on Server Fault See other posts from Server Fault or by meder
Published on 2009-12-10T17:35:39Z Indexed on 2012/06/01 4:42 UTC
Read the original article Hit count: 973

Filed under:
|

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.

© Server Fault or respective owner

Related posts about nginx

Related posts about fcgi