Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/irspy
[irspy-moved-to-github.git] / web / conf / apache2.0 / irspy.conf
1 # Sample configuration for running an IRSpy web-site under Apache 2.x.
2 #
3 # This is the configuration that I use on the development machine 
4 #
5 #       /home/indexdata/irspy   
6 #
7 # This file can be included in the Apache configuration by adding a
8 # line like this to apache.conf or one of its included files:
9 #       Include /home/indexdata/irspy/web/conf/apache2.0/irspy.conf
10 #
11 # For debian & unbuntu: please read irspy/README for a list of depending packages
12 #
13
14 #
15 # an irspy toroid process takes up to 90MB for each request
16 # 90*32 => 3GB RAM
17 #
18 MaxClients 32
19
20 <VirtualHost *:80>
21     ServerName irspy.indexdata.com
22     ServerAlias irspy02.indexdata.com irspy irspy-dev.indexdata.com irspy-dev
23
24     ErrorLog     /var/log/apache2/irspy-error.log
25     CustomLog    /var/log/apache2/irspy-access.log combined
26     DocumentRoot /home/indexdata/irspy/web/htdocs
27     <FilesMatch "\.(html|css)$">
28      SetHandler perl-script
29      PerlHandler HTML::Mason::ApacheHandler
30     </FilesMatch>
31
32     PerlSetVar MasonArgsMethod mod_perl
33
34     PerlAddVar MasonCompRoot "private => /home/indexdata/irspy/web/htdocs"
35     PerlSetVar MasonDataDir              /home/indexdata/irspy/web/data
36     PerlSetVar IRSpyLibDir               /home/indexdata/irspy/lib
37     PerlSetEnv PERL5LIB                  /home/indexdata/irspy/lib:/home/indexdata/perl-indexdata-utils/lib
38     PerlSetEnv IRSPY_COUNTER_FILE        /home/indexdata/irspy/zebra/db/counter
39
40     #PerlSetEnv IRSpyDbName     localhost:8018/IR-Explain---1
41
42    # We need +Parent to make PerlSwitches -I work properly ... don't ask.
43    PerlOptions +Parent
44    PerlSwitches -I/home/indexdata/irspy/lib -I/home/indexdata/perl-indexdata-utils/lib
45
46     <Location /admin>
47         AuthType Basic
48         AuthName "IRSpy Administration"
49         AuthUserFile /home/indexdata/irspy/web/conf/htpasswd
50         Require user admin irspy
51     </Location>
52
53     ProxyRequests off
54     <Proxy *>
55       Order deny,allow
56       Allow from all
57     </Proxy>
58
59     
60     # map /toroid to CGI script irspy-toroid.cgi
61     ScriptAlias /toroid/records /home/indexdata/irspy-toroid/irspy-toroid.cgi 
62
63
64     # legacy ruby daemon
65     #ProxyPass         /toroid/ http://localhost:12367/
66     #ProxyPassReverse  /toroid/ http://localhost:12367/
67
68     # compress output
69     <Location />
70       AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml
71       SetOutputFilter DEFLATE
72     </Location>
73 </VirtualHost>
74