1 # Example Apache2 configuration using CGI mod_cgi
2 # If possible, use mod_perl (see apache2_perl.conf) or
3 # a standalone PSGI/Plack # server instead of this.
4 # Adjust paths to your installation.
6 ServerName "public-inbox"
7 ServerRoot "/var/www/cgi-bin"
8 DocumentRoot "/var/www/cgi-bin"
9 ErrorLog "/tmp/public-inbox-error.log"
10 PidFile "/tmp/public-inbox.pid"
12 LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
13 LoadModule env_module /usr/lib/apache2/modules/mod_env.so
14 LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
15 LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
16 LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
17 TypesConfig "/dev/null"
19 <Directory /var/www/cgi-bin>
21 AddHandler cgi-script .cgi
23 # we use this hack to ensure "public-inbox.cgi" doesn't show up
24 # in any of our redirects:
25 SetEnv NO_SCRIPT_NAME 1
27 # our public-inbox.cgi requires PATH_INFO-based URLs with minimal
28 # use of query parameters
29 DirectoryIndex public-inbox.cgi
31 RewriteCond %{REQUEST_FILENAME} !-f
32 RewriteCond %{REQUEST_FILENAME} !-d
33 RewriteRule ^.* /public-inbox.cgi/$0 [L,PT]