Perl类日志
一、安装Lighttpd配置
二、vi /usr/local/lighttpd/etc/lighttpd.conf
1、"mod_cgi",去掉前面的#
2、index-file.names = ( "index.php", "index.html","index.htm", "default.htm" ,"index.cgi","index.pl","index.py")添加默认首页。
3、static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ,"cgi","py")
4、cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl" ,
".py" => "/usr/bin/python" , )
三、测试:
vi /www/index.py
二、vi /usr/local/lighttpd/etc/lighttpd.conf
1、"mod_cgi",去掉前面的#
引用
2、index-file.names = ( "index.php", "index.html","index.htm", "default.htm" ,"index.cgi","index.pl","index.py")添加默认首页。
3、static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ,"cgi","py")
4、cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl" ,
".py" => "/usr/bin/python" , )
三、测试:
vi /www/index.py
mod_perl 模块:
wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
tar -zxvf mod_perl-2.0-current.tar.gz
cd mod_perl-2.0.3
perl Makefile.PL MP_APXS=/usr/local/apache/bin/apxs
make && make test
make install
apache自动重启模块:
wget http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/Apache-Reload-0.07.tar.gz
tar -zxvf Apache-Reload-0.07.tar.gz
cd Apache-Reload-0.07
perl Makefile.PL
make install
vi /usr/local/apache/conf/httpd.conf
LoadModule perl_module modules/mod_perl.so
引用
wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
tar -zxvf mod_perl-2.0-current.tar.gz
cd mod_perl-2.0.3
perl Makefile.PL MP_APXS=/usr/local/apache/bin/apxs
make && make test
make install
apache自动重启模块:
wget http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/Apache-Reload-0.07.tar.gz
tar -zxvf Apache-Reload-0.07.tar.gz
cd Apache-Reload-0.07
perl Makefile.PL
make install
vi /usr/local/apache/conf/httpd.conf
LoadModule perl_module modules/mod_perl.so