properly deal with broadsoft's awful non-standard quoting, RT#86028, RT#81941
[freeside.git] / htetc / freeside-base2.4.conf
1 PerlModule Apache2::compat
2
3 #PerlModule DBIx::Profile
4 #PerlModule Apache::DBI
5
6 PerlModule HTML::Mason
7 PerlSetVar MasonArgsMethod CGI
8 PerlModule HTML::Mason::ApacheHandler
9
10 PerlRequire "%%%MASON_HANDLER%%%"
11
12 PerlChildInitHandler FS::Mason::child_init
13
14 #Locale::SubCountry
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 #disables HTTP, so HTTPS only
24 #PerlSetVar FreesideSecure 1
25
26 #prevents cookie theft via JS
27 PerlSetVar FreesideHttpOnly 1
28
29 #prevents broken restarts with "couldn't grab the accept mutex" error
30 Mutex posixsem
31
32 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%>
33
34     #work around Apache2::AuthCookie vs. mod_dir
35     DirectoryIndex disabled
36     Options -Indexes
37     #XXX need to also work properly for installs w/o /freeside/ in path
38     RewriteEngine On
39     RewriteBase /freeside/
40     RewriteRule ^/?$ /freeside/index.html [L,R=301]
41
42     AuthName Freeside
43     AuthType FS::AuthCookieHandler24
44     PerlAuthenHandler FS::AuthCookieHandler24->authenticate
45     require valid-user
46
47     <Files ~ "(\.cgi|\.html)$">
48         SetHandler perl-script
49         PerlHandler HTML::Mason
50     </Files>
51
52 </Directory>
53
54 <Files login>
55     AuthName Freeside
56     AuthType FS::AuthCookieHandler24
57     SetHandler perl-script
58     PerlHandler FS::AuthCookieHandler24->login
59 </Files>
60
61 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/loginout/>
62     <Files "login.html">
63         Satisfy any
64     </Files>
65 </Directory>
66
67 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/elements/>
68     <Files "freeside.css">
69         Satisfy any
70     </Files>
71
72     <Files ~ "(\.html)$">
73         Deny from all
74         SetHandler None
75     </Files>
76 </Directory>
77
78 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/Helpers/>
79     SetHandler perl-script
80     PerlHandler HTML::Mason
81 </Directory>
82
83 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/REST/1.0/NoAuth/>
84     Satisfy any
85 </Directory>
86
87 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/NoAuth/iCal/>
88     Satisfy any
89     SetHandler perl-script
90     PerlHandler HTML::Mason
91 </Directory>
92
93 <Directory %%%FREESIDE_DOCUMENT_ROOT%%%/REST/>
94     Satisfy any
95     SetHandler perl-script
96     PerlHandler HTML::Mason
97 </Directory>