3 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<IfModule mod_perl.c>
#PerlTrace all
PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl"
#Provide two aliases to the same cgi-bin directory,
#to see the effects of the 2 different mod_perl modes
#for Apache2::Registry Mode
Alias /perl/ /var/www/localhost/perl/
#for Apache2::Perlrun Mode
Alias /cgi-perl/ /var/www/localhost/perl/
<IfModule mod_access.c>
<Location /perl-status>
SetHandler perl-script
PerlResponseHandler Apache2::Status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</IfModule>
<Directory /home/*/public_html/perl>
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options -Indexes ExecCGI
PerlOptions +ParseHeaders
</Directory>
PerlModule ModPerl::Registry
#set Apache::Registry Mode for /perl Alias
# To set subdirectories to use perl set the following
# and comment the orignial:
# <Location ~ "^/perl/.*\.pl$">
<Location /perl/*.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options -Indexes ExecCGI
PerlSendHeader On
</Location>
#set Apache::PerlRun Mode for /cgi-perl Alias
<Location /cgi-perl/*.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options -Indexes ExecCGI
PerlSendHeader On
</Location>
</ifModule>
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain; charset=iso-8859-1\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
print "Content-type: text/plain\n\n";
3 Einträge, 1 Seite |