]> Sergey Matveev's repositories - public-inbox.git/blobdiff - examples/apache2_perl.conf
examples/public-inbox.psgi: document ReverseProxy
[public-inbox.git] / examples / apache2_perl.conf
index e963af6e4d31183ad9e44b2400b6c1ceb8172ced..6615eb9f5fa849a954167c73c0597c07f09778f8 100644 (file)
@@ -1,12 +1,12 @@
 # Example Apache2 configuration using mod_perl2
-# adjust paths to your installation
+# Adjust paths to your installation
 
 ServerName "public-inbox"
 ServerRoot "/var/www/cgi-bin"
 DocumentRoot "/var/www/cgi-bin"
 ErrorLog "/tmp/public-inbox-error.log"
 PidFile "/tmp/public-inbox.pid"
-Listen 8080
+Listen 127.0.0.1:8080
 LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
 LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
 LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
@@ -14,7 +14,6 @@ LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
 TypesConfig "/dev/null"
 
 # PerlPassEnv PATH # this is implicit
-PerlPassEnv HOME
 <Directory /var/www/cgi-bin>
        Options +ExecCGI
        AddHandler perl-script .cgi
@@ -25,6 +24,9 @@ PerlPassEnv HOME
        # in any of our redirects:
        PerlSetEnv NO_SCRIPT_NAME 1
 
+       # no need to set no rely on HOME if using this:
+       PerlSetEnv PI_CONFIG /home/pi/.public-inbox/config
+
        # our public-inbox.cgi requires PATH_INFO-based URLs with minimal
        # use of query parameters
        DirectoryIndex public-inbox.cgi