1 # Example Apache2 configuration using mod_perl2
2 # adjust paths to your installation
4 ServerName "public-inbox"
5 ServerRoot "/var/www/cgi-bin"
6 DocumentRoot "/var/www/cgi-bin"
7 ErrorLog "/tmp/public-inbox-error.log"
8 PidFile "/tmp/public-inbox.pid"
10 LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
11 LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
12 LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
13 LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
14 TypesConfig "/dev/null"
16 # PerlPassEnv PATH # this is implicit
18 <Directory /var/www/cgi-bin>
20 AddHandler perl-script .cgi
21 PerlResponseHandler ModPerl::Registry
22 PerlOptions +ParseHeaders
24 # we use this hack to ensure "public-inbox.cgi" doesn't show up
25 # in any of our redirects:
26 PerlSetEnv NO_SCRIPT_NAME 1
28 # our public-inbox.cgi requires PATH_INFO-based URLs with minimal
29 # use of query parameters
30 DirectoryIndex public-inbox.cgi
32 RewriteCond %{REQUEST_FILENAME} !-f
33 RewriteCond %{REQUEST_FILENAME} !-d
34 RewriteRule ^.* /public-inbox.cgi/$0 [L,PT]