FastCGI Perl + Nginx

Дмитрий Лялюев dmitriy at lyalyuev.info
Fri Nov 30 11:11:22 UTC 2012


Не пойму в чем проблема. Может быть уважаемый All подскажет?

Пытаюсь прикрутить Foswiki к Nginx без индейца:

server {
   listen 80;
   server_name wiki.localdomain;
   root /opt/data/wiki;

   error_log /tmp/error.log;
   access_log /tmp/access.log;

   if ($args ~* "skin|raw|template|maxrev|minrev|currev") {
        rewrite ^(.*)$ /bin/view/$1?;
   }

   rewrite ^/bin/view(.*)$ / redirect;

   rewrite ^(/Help)$ /bin/view/Help last;
   rewrite ^/(Main|System|Sandbox|Help)(/[A-Z].*)$ /bin/view/$1$2 last;
   rewrite ^/([A-Z].*) /bin/view/Help/$1 last;
   rewrite ^/(Help)(/[A-Z].*)$ $2;
   rewrite ^/([A-Z].*) /bin/view/Help/$1 last;
   rewrite ^/$ /bin/view/Help last;

   location ~ /bin/view/(System|System/.*|Main|Main/.*|Sandbox|Sandbox/.*) {
        auth_basic               "Enter your WikiName. (First name and last
name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register
if you do not have one.";
        auth_basic_user_file     /opt/data/wiki/data/.htpasswd;
        gzip off;
        fastcgi_pass             unix:/var/run/wiki/fcgi.sock;
        fastcgi_split_path_info  ^(/bin/\w+)(.*);  # Yes, one of the above
links had this wrong
        fastcgi_param            SCRIPT_FILENAME
/opt/data/wiki/$fastcgi_script_name;
        fastcgi_param            PATH_INFO       $fastcgi_path_info;
        fastcgi_param            SCRIPT_NAME     $fastcgi_script_name;
        fastcgi_param            REMOTE_USER     $remote_user;
        include fastcgi_params;
   }

   location / {
        limit_except GET POST { deny all; }
   }

   location ~* /pub/.*\.(s?p?html?|php3?|pl|py|cgi)$ {
        types {}
        default_type application/octet-stream;
   }

   location ~ /bin/configure {
        allow all;   # add allow statements only for administrative IPs!
        deny all;
        gzip off;
        fastcgi_pass              unix:/var/run/wiki/configure.sock;
             # $socket_path is not in nginx, see number 2 above
        fastcgi_split_path_info   ^(/bin/configure)(.*);  # Yes, one of the
above links had this wrong
        fastcgi_param             SCRIPT_FILENAME
/opt/data/wiki/bin/configure;  # $configure_script is not in nginx, see
number 2 above
        fastcgi_param             PATH_INFO         $fastcgi_path_info;
        fastcgi_param             SCRIPT_NAME       $fastcgi_script_name;
        fastcgi_param             REMOTE_USER       $remote_user;
        include fastcgi_params;
   }

   location ~ /bin/.* {
        gzip off;
        fastcgi_pass             unix:/var/run/wiki/fcgi.sock;        #
$fcgi_socket comes from #3 above
        fastcgi_split_path_info  ^(/bin/\w+)(.*);  # Yes, one of the above
links had this wrong
        fastcgi_param            SCRIPT_FILENAME
/opt/data/wiki/$fastcgi_script_name;
        fastcgi_param            PATH_INFO       $fastcgi_path_info;
        fastcgi_param            SCRIPT_NAME     $fastcgi_script_name;
        fastcgi_param            REMOTE_USER     $remote_user;
        include fastcgi_params;
   }

   location ~ (^/lib|^/data|^/locale|^/templates|^/tools|^/work)  { deny
all; }
}

По вики ходится все замечательно, скрипт конфига вики работает, а вот
http://wiki.localdomain/bin/edit/.... и т.п. не хочет работать.

Ткните носом неразумного плз. :)

-- 
С уважением,
Дмитрий Лялюев
тел. +380 (66) 532-29-62
Все контакты для связи на http://lyalyuev.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20121130/02638132/attachment.html>


Подробная информация о списке рассылки nginx-ru