Project

General

Profile

[Solved] moving from mod_perl (apache2) to httpd PerlRequire equivalent

Added by hjw over 5 years ago

I am trying to move a web app over from apache2 to lighttpd 1.4.45 running on a pi zero.
I have edited/enabled cgi.conf as well as lighttpd.conf (and accesslog and status) and I can now
execute a simple perl script living in the directory where my app lives. Unfortunately I cannot actually run my app.

with apache's mod_perl there was a line in the httpd.conf:

PerlRequire /var/www/html/dw-programs/startup.pl

the startup.pl file tells perl to use that directory to find its modules/files:

use lib qw(/var/www/html/dw-programs);

the error message that I get says it can't locate Settings.pm (which lives in /var/www/html/dw-programs and is being referenced in a use Settings; line in every one of my perl files)

Can't locate Settings.pm in @INC (you may need to install the Settings module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/arm-linux-gnueabihf/perl5/5.24 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at /var/www/html/dw-programs/status.pl line 4

So, is there a way to get the functionality that mod_perl provides (PerlRequire) when using lighttpd? It would be best if I can do this through the config files instead of modifying the code base, that way everything will still run fine under apache

Sincerely,
Hawley


Replies (1)

RE: moving from mod_perl (apache2) to httpd PerlRequire equivalent - Added by gstrauss over 5 years ago

Please use your favorite search engine and look up the "PERL5LIB" environment variable.

    (1-1/1)