我想在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