我想在nginx fastcgi環境(debian 6.0)中使用spawn-fcgi獲取C :: A應用程序。CGI的nginx fastcgi配置::應用程序的應用程序
Ç::路由使用$self->mode_param(path_info=> 1, param => 'rm');
問題配置是,無論Ç::一個應用程序的URL(example.com/cities
,example.com/profile/99
等),我請求時,它總是顯示網頁這是example.com/index.pl
做什麼。
我nginx的設置是
server {
listen 80;
server_name example.com;
root /var/www/example.com/htdocs;
index index.pl index.html;
location/{
try_files $uri $uri/ /index.pl;
}
location ~ .*\.pl$ {
include fastcgi_params; # this is the stock fastcgi_params file supplied in debian 6.0
fastcgi_index index.pl;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PERL5LIB "/var/www/example.com/lib";
fastcgi_param CGIAPP_CONFIG_FILE "/var/www/example.com/conf/my.conf";
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
}
我也以同樣的方式成功設立的幾個PHP應用程序。但是,在這種情況下,我懷疑我沒有將必要的fastcgi_param
一直傳遞給它所需的C :: A。
你的想法是什麼?
感謝您的答覆。但我得到500內部錯誤和堆遞歸重定向像「/index.pl/index.pl/cities」調試打開nginx錯誤日誌。 – perlwle 2012-08-02 16:10:15
謝謝你嘗試我最初的想法。我現在用一個完全不同的建議修改了這個問題。 – 2012-08-02 17:47:48
我認爲這是正確的道路。然而,由於某種原因,path_info部分似乎沒有從nginx傳遞到我的應用程序。我已經手動將path_info設置爲其他內容,但仍未看到它顯示在C :: A應用程序中。 – perlwle 2012-08-03 05:50:17