path cleanups
[irspy-moved-to-github.git] / web / conf / apache2.0 / irspy.conf
1 # $Id: cfspy.conf,v 1.4 2009-04-16 18:31:20 wosch Exp $
2 #
3 # Sample configuration for running an IRSpy web-site under Apache 2.x.
4 #
5 # This is the configuration that I use on the development machine us2
6 #       /usr/local/src/git/indexdata/irspy
7 #
8 # This file can be included in the Apache configuration by adding a
9 # line like this to apache.conf or one of its included files:
10 #       Include /usr/local/src/git/indexdata/irspy/web/conf/apache2.0/irspy.conf
11 #
12 # When running on Ubuntu (and probably Debian), don't forget to
13 # install libapache-request-perl as well as libhtml-mason-perl,
14 # otherwise Mason will fail mysteriously.
15 #
16 # For Apache 2.x
17 #  sudo apt-get install libxml-libxslt-perl 
18 #  sudo apt-get install libhtml-mason-perl
19 #  sudo apt-get install libapache2-request-perl
20
21 #NameVirtualHost 192.168.1.75
22
23 <VirtualHost *:80>
24     ServerName irspy.indexdata.com
25     ServerAlias irspy2.indexdata.com irspy
26
27     ErrorLog     /var/log/apache2/irspy-error.log
28     CustomLog    /var/log/apache2/irspy-access.log combined
29     DocumentRoot /usr/local/src/git/indexdata/irspy/web/htdocs
30     <FilesMatch "\.(html|css)$">
31      SetHandler perl-script
32      PerlHandler HTML::Mason::ApacheHandler
33     </FilesMatch>
34
35     PerlSetVar MasonArgsMethod mod_perl
36
37     PerlAddVar MasonCompRoot "private => /usr/local/src/git/indexdata/irspy/web/htdocs"
38     PerlSetVar MasonDataDir              /usr/local/src/git/indexdata/irspy/web/data
39     PerlSetVar IRSpyLibDir               /usr/local/src/git/indexdata/irspy/lib
40     PerlSetEnv PERL5LIB /usr/local/src/git/indexdata/irspy/lib
41
42    # We need +Parent to make PerlSwitches -I work properly ... don't ask.
43    PerlOptions +Parent
44    PerlSwitches -I/usr/local/src/git/indexdata/irspy/lib
45
46     <Location /admin>
47         AuthType Basic
48         AuthName "IRSpy Administration"
49         AuthUserFile /usr/local/src/git/indexdata/irspy/web/conf/htpasswd
50         Require user admin
51     </Location>
52 </VirtualHost>
53