FastCGI 基礎

mod_fcgi

httpd.conf

 AddHandler fastcgi-script fcgi
 <IfModule fastcgi_module>
 FastCgiServer /usr/local/www/fcgi/test.fcgi -processes 2
 FastCgiServer /usr/local/www/fcgi/index.fcgi -processes 2
 </IfModule>
 Alias /fcgi/ "/usr/local/www/fcgi/"
 <directory /usr/local/www/fcgi>
 allowoverride all
 options all
 </directory>

index.fcgi

 #!/usr/bin/perl
 
 use CGI::Fast qw(:standard);
 $COUNTER = 0;
 while (new CGI::Fast) {
     print header;
     print start_html("Fast CGI Rocks");
     print
         h1("Fast CGI Rocks"),
         "Invocation number ",b($COUNTER++),
         " PID ",b($$),".",
         hr;
     print end_html;
 }

参考

http://d.tir.jp/pw?FastCGI http://search.cpan.org/~lds/CGI.pm-3.27/CGI/Fast.pm


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS