1 import ./make-test-python.nix (
6 meta = with pkgs.lib.maintainers; {
20 adminAddr = "admin@localhost";
21 virtualHosts."modperl" =
23 inc = pkgs.writeTextDir "ModPerlTest.pm" ''
26 use Apache2::RequestRec ();
27 use Apache2::RequestIO ();
28 use Apache2::Const -compile => qw(OK);
31 $r->content_type('text/plain');
32 print "Hello mod_perl!\n";
33 return Apache2::Const::OK;
37 startup = pkgs.writeScript "startup.pl" ''
39 split ":","${with pkgs.perl.pkgs; makeFullPerlPath ([ mod_perl2 ])}";
45 PerlRequire ${startup}
47 locations."/modperl" = {
49 SetHandler perl-script
50 PerlResponseHandler ModPerlTest
60 machine.wait_for_unit("httpd.service")
61 response = machine.succeed("curl -fvvv -s http://127.0.0.1:80/modperl")
62 assert "Hello mod_perl!" in response, "/modperl handler did not respond"