<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, без засечек;font-size:16px"><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr">Доброго времени.</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr"><br></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr">Пытаюсь заставить nginx обрабатывать cgi скрипты на perl.</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr">PHP FPM/FastCGI страницы возвращает, а вот c перлом проблема.<br></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr"><br></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr">Ошибка 404, страница не найдена.</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr"><br></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr">Параметры вопроса:</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr">Система FreeBSD 10.1-RC4.</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr"><br></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">nginx/1.7.7 опции сборки порта:</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">-----------------------------------------------------------</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> DEBUG=on: Build with debugging support</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> HTTP=on: Enable HTTP module</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> HTTP_CACHE=on: Enable http_cache module</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> HTTP_PERL=on: Enable http_perl module<span class="" style="white-space:pre"> </span>!!!</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> HTTP_REWRITE=on: Enable http_rewrite module</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> HTTP_SSL=on: Enable http_ssl module</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> HTTP_STATUS=on: Enable http_stub_status module</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> MAIL_POP3=on: Enable POP3 proxy module</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> MAIL_SMTP=on: Enable SMTP proxy module</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> MAIL_SSL=on: Enable mail_ssl module</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> WWW=on: Enable html sample files</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> ----------------------------------------------------------</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">fcgiwrap-1.1.0_2<br></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">----------------------------------------------------------</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">Процессы:</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""><br></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">#ps -aux | grep www | grep -v grep</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www 708 0.0 0.7 100708 7060 - I 3:34AM 0:00.08 php-fpm: pool www (php-fpm)</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www 709 0.0 0.7 100708 7340 - I 3:34AM 0:00.12 php-fpm: pool www (php-fpm)</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www 982 0.0 0.2 14460 1932 - Is 4:21AM 0:00.00 daemon: /usr/local/sbin/fcgiwrap[983] (daemon)</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www 983 0.0 0.2 14444 1904 - I 4:21AM 0:00.00 /usr/local/sbin/fcgiwrap -s unix:/tmp/fcgiwrap.sock</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www 1007 0.0 1.2 49388 11976 - S 4:24AM 0:00.05 nginx: worker process (nginx)</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www 1008 0.0 1.1 49388 11740 - I 4:24AM 0:00.04 nginx: worker process (nginx)</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">#sockstat | grep www</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www nginx 1008 6 tcp4 *:80 *:*</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www nginx 1008 8 stream -> ??</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www nginx 1008 11 stream -> ??</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www nginx 1007 5 stream -> ??</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www nginx 1007 6 tcp4 *:80 *:*</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www nginx 1007 9 stream -> ??</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www fcgiwrap 983 0 stream /tmp/fcgiwrap.sock</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www php-fpm 709 0 stream /tmp/php5-fpm.sock</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">www php-fpm 708 0 stream /tmp/php5-fpm.sock</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">---------------------------------------------------</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">Пермиссии сокетов</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""><br></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">srw-rw---- 1 www www 0B Dec 24 03:34 /tmp/php5-fpm.sock</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">srw-rw---- 1 root www 0B Dec 22 10:32 /tmp/fcgiwrap.sock</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">-------------------------------------------------</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">nginx.conf локэйшн для perl:</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">............</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""> location ~ ^/(.*\.cgi)$</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">{</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">try_files $uri =404;</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">gzip off;</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">fastcgi_param DOCUMENT_ROOT /www/www/cgi-bin;</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">fastcgi_pass unix:/tmp/fcgiwrap.sock;</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">fastcgi_param SCRIPT_NAME $document_root$fastcgi_script_name;</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">fastcgi_index index.cgi;</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">include /usr/local/etc/nginx/fastcgi_params;</div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style="">}</div><div class="" style="" id="yui_3_16_0_1_1419434714824_13131">-------------------------------------------</div><div class="" style="" id="yui_3_16_0_1_1419434714824_13131"><div class="" id="yui_3_16_0_1_1419434714824_13131" style="">/www/www/cgi-bin</div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="">-rw-r--r-- 1 root www 694B Dec 19 23:32 test.html</div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="">-rwxrwx--- 1 root www 282B Dec 22 10:19 index.cgi</div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="">------------------------------------------</div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr">Страница test.html возвращается, index.cgi ошибка 404</div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr"><br></div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr">В логе по этому поводу ничего. Специально на tail -f ждал ошибок.... ничего. Просто смотрелка возвращает 404.</div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr"><br></div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr">Прошу помощи сообщества. Может кто-нибудь занимался и получил результат. Сам в тупике. </div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr">Спасибо всем!</div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr"><br></div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr"><br></div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr"><br></div><div class="" id="yui_3_16_0_1_1419434714824_13131" style="" dir="ltr"> </div></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1419434714824_10758" dir="ltr" class="" style=""><br class="" style=""></div></div></body></html>