Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / htetc / freeside-base2.4.conf
1 PerlModule Apache2::compat
2
3 #PerlModule Apache::DBI
4
5 PerlModule HTML::Mason
6 PerlSetVar MasonArgsMethod CGI
7 PerlModule HTML::Mason::ApacheHandler
8
9 PerlChildInitHandler "sub { srand }"
10
11 PerlRequire "%%%MASON_HANDLER%%%"
12
13 #Locale::SubCountry
14 #
15 AddDefaultCharset UTF-8
16
17 PerlModule FS::AuthCookieHandler24
18 PerlAddAuthzProvider user FS::AuthCookieHandler24->authz_handler
19
20 #XXX need to also work properly for installs w/o /freeside/ in path
21 PerlSetVar FreesideLoginScript /freeside/loginout/login.html
22
23 #PerlSetVar FreesideEverSecure 1
24 PerlSetVar FreesideHttpOnly 1
25
26 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%>
27
28     #work around Apache2::AuthCookie vs. mod_dir
29     DirectoryIndex disabled
30     Options -Indexes
31     #XXX need to also work properly for installs w/o /freeside/ in path
32     RewriteEngine On
33     RewriteBase /freeside/
34     RewriteRule ^/?$ /freeside/index.html [L,R=301]
35
36     AuthName Freeside
37     AuthType FS::AuthCookieHandler24
38     PerlAuthenHandler FS::AuthCookieHandler24->authenticate
39     require valid-user
40
41     <Files ~ "(\.cgi|\.html)$">
42         SetHandler perl-script
43         PerlHandler HTML::Mason
44     </Files>
45
46 </Directory>
47
48 <Files login>
49     AuthName Freeside
50     AuthType FS::AuthCookieHandler24
51     SetHandler perl-script
52     PerlHandler FS::AuthCookieHandler24->login
53 </Files>
54
55 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/loginout/>
56     <Files "login.html">
57         Satisfy any
58     </Files>
59 </Directory>
60
61 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/elements/>
62     <Files "freeside.css">
63         Satisfy any
64     </Files>
65 </Directory>
66
67 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/Helpers/>
68     SetHandler perl-script
69     PerlHandler HTML::Mason
70 </Directory>
71
72 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/REST/1.0/NoAuth/>
73     Satisfy any
74 </Directory>