Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/irspy
[irspy-moved-to-github.git] / web / conf / apache2.0 / cartney-dev.conf
diff --git a/web/conf/apache2.0/cartney-dev.conf b/web/conf/apache2.0/cartney-dev.conf
new file mode 100644 (file)
index 0000000..6442e68
--- /dev/null
@@ -0,0 +1,46 @@
+# This is the configuration that I (Mike) use on the development
+# machine cartney, which is a MacBook Pro
+#
+# See comments in mk2-config-cmc/apache/cmc-dev-mac.conf for details
+# on running HTML::Mason-based sites under the apache2 port for Macs.
+
+PerlSwitches -I/usr/local/src/git/irspy/lib
+
+# Empirally, it seems that including this next line prevents the bug
+# in which some but not all requests result in the error:
+#      Undefined subroutine &ZOOM::IRSpy::connect_to_registry
+# (This ought not to make any difference, as the Apache2::Request
+# module should of course get loaded from within IRSpy anyway, but you
+# never know with Apache.)
+PerlModule Apache2::Request
+
+<VirtualHost *:80>
+    ServerName x.irspy.indexdata.com
+    <Directory />
+        Allow from all
+    </Directory>
+
+    ErrorLog     /opt/local/apache2/logs/irspy-error.log
+    CustomLog    /opt/local/apache2/logs/irspy-access.log combined
+    DocumentRoot /usr/local/src/git/irspy/web/htdocs
+    <FilesMatch "\.(html|css)$">
+     SetHandler perl-script
+     PerlHandler HTML::Mason::ApacheHandler
+    </FilesMatch>
+
+    PerlSetVar MasonArgsMethod mod_perl
+
+    PerlAddVar MasonCompRoot "private => /usr/local/src/git/irspy/web/htdocs"
+    PerlSetVar MasonDataDir /tmp/irspy-mason
+    # IRSpyLibDir is used only to find source for online documentation
+    PerlSetVar IRSpyLibDir /usr/local/src/git/irspy/lib
+    PerlSetEnv PERL5LIB /usr/local/src/git/irspy/lib
+
+    <Location /admin>
+       AuthType Basic
+       AuthName "IRSpy Administration"
+       AuthUserFile /usr/local/src/git/irspy/web/conf/htpasswd
+       Require user admin
+    </Location>
+</VirtualHost>
+