File: mason_example.conf

package info (click to toggle)
libhtml-mason-perl 1%3A1.26-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,636 kB
  • ctags: 1,260
  • sloc: perl: 13,880; sh: 154; makefile: 47
file content (49 lines) | stat: -rw-r--r-- 1,853 bytes parent folder | download
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
# This -*- Apache -*- configuration enables the example Mason components in /var/www/mason_example

<IfModule mod_perl.c>

# We have mod_perl available
PerlModule CGI
PerlModule CGI::Cookie
<Directory /var/www/mason_example>
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
#   We use the CGI args_method to stop this crashing if
# libapache-request-perl is not installed

PerlSetVar MasonArgsMethod CGI
#   If you have install libapache-request-perl, you can delete the above line.
#   You should also replace the above two "PerlModule CGI" and "PerlModule CGI::Cookie" lines with
#PerlModule Apache::Request
</Directory>

# This chunk allows concurrent use with mod_perl *or* CGI:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/mason_example_cgi/$ /usr/lib/cgi-bin/mason_example.cgi [E=PATH_INFO:/mason_example/index.html,T=application/x-httpd-cgi]
RewriteRule ^/mason_example_cgi/(.+)/$ /usr/lib/cgi-bin/mason_example.cgi [E=PATH_INFO:/mason_example/$1/index.html,T=application/x-httpd-cgi]
RewriteRule ^/mason_example_cgi/(.+) /usr/lib/cgi-bin/mason_example.cgi [E=PATH_INFO:/mason_example/$1,T=application/x-httpd-cgi]
</IfModule>
# And so http://localhost/mason_example/     uses mod_perl, and
#        http://localhost/mason_example_cgi/ uses CGI
# This is *not* the way you would normally use mason-with-cgi, see below for an easier way!
</IfModule>

<IfModule !mod_perl.c>

# No mod_perl available, just use CGI
# We need wither mod_actions or mod_rewrite enabled to do this. What
# to do if the user has neither enabled?
# (in any case, don't present the user with a broken config)
<IfModule mod_actions.c>
Action mason_example http://localhost/cgi-bin/mason_example.cgi
<Directory /var/www/mason_example>
SetHandler mason_example
</Directory>
</IfModule>
# mod_actions.c

</IfModule>
# !mod_perl.c

# 2004-03-04 araqnid