summaryrefslogtreecommitdiff
path: root/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf
blob: 9cf7b7b4394fb02dfd7764da8ef3c985d725e4cc (plain)
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
50
51
52
53
54
<IfDefine PERL>
LoadModule perl_module modules/mod_perl.so

#PerlTrace all
PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl"
PerlModule ModPerl::Registry

# 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/

<Location /perl-status>
	SetHandler perl-script
	PerlResponseHandler Apache2::Status
	Require host localhost
</Location>

<Directory /home/*/public_html/perl>
	SetHandler perl-script
	PerlResponseHandler ModPerl::PerlRun
	PerlOptions +ParseHeaders

	# Clear all existing options and only permit cgi.
	Options ExecCGI
</Directory>

# set Apache::Registry Mode for /perl Alias
<Location /perl/*.pl>
	SetHandler perl-script
	PerlResponseHandler ModPerl::Registry
	PerlSendHeader On

	# Clear all existing options and only permit cgi.
	Options ExecCGI

	Require all granted
</Location>

# set Apache::PerlRun Mode for /cgi-perl Alias
<Location /cgi-perl/*.pl>
	SetHandler perl-script
	PerlResponseHandler ModPerl::PerlRun
	PerlSendHeader On

	# Clear all existing options and only permit cgi.
	Options ExecCGI

	Require all granted
</Location>
</IfDefine>

# vim: ts=4 filetype=apache