Link to stats.
[cocanwiki.git] / conf / cocanwiki.conf
1 # Apache configuration for COCANWIKI.
2 # $Id: cocanwiki.conf,v 1.6 2004/09/23 09:48:45 rich Exp $
3
4 # Uncomment the following lines if necessary.  You will probably need
5 # to adjust the paths to reflect where cocanwiki is really installed.
6
7 # DocumentRoot /usr/share/cocanwiki/html
8 # CamlLoad /usr/share/cocanwiki/html/_bin/cocanwiki.cma
9
10 <Location /_bin>
11   SetHandler ocaml-bytecode
12   CamlHandler Registry.handler
13   Options ExecCGI
14   Allow from all
15 </Location>
16
17 <Location /_bin/admin>
18   # The admin subdirectory contains sensitive scripts, and should
19   # be protected by ACLs and/or passwords.  This is just an example:
20   Deny from all
21   Allow from 10.0.0.249
22 </Location>
23
24 <Location /_graphics>
25   ExpiresActive On
26   ExpiresDefault "now plus 1 hour"
27 </Location>
28
29 <Location /_js>
30   ExpiresActive On
31   ExpiresDefault "now plus 1 hour"
32 </Location>
33
34 <Location /_css>
35   ExpiresActive On
36   ExpiresDefault "now plus 1 hour"
37 </Location>
38
39 <Location /_static>
40   ExpiresActive On
41   ExpiresDefault "now plus 1 hour"
42 </Location>
43
44 RewriteEngine on
45
46 # The robots.txt file needs special treatment.
47 RewriteRule ^/robots.txt /robots.txt [PT,L]
48
49 # Global scripts.
50 RewriteRule ^/_admin$ /_bin/admin/admin.cmo [PT,L,QSA]
51 RewriteRule ^/_contact$ /_bin/contact.cmo [PT,L,QSA]
52 RewriteRule ^/_files$ /_bin/files.cmo [PT,L,QSA]
53 RewriteRule ^/_global.css$ /_bin/hoststyle.cmo [PT,L,QSA]
54 RewriteRule ^/_images$ /_bin/images.cmo [PT,L,QSA]
55 RewriteRule ^/_login$ /_bin/login_form.cmo [PT,L]
56 RewriteRule ^/_logout$ /_bin/logout.cmo [PT,L,QSA]
57 RewriteRule ^/_recent$ /_bin/recent.cmo [PT,L,QSA]
58 RewriteRule ^/_sitemap$ /_bin/sitemap.cmo [PT,L,QSA]
59 RewriteRule ^/_stats$ /_bin/stats.cmo [PT,L,QSA]
60 RewriteRule ^/_users$ /_bin/users.cmo [PT,L,QSA]
61
62 # Image and file downloads.
63 RewriteRule ^/_file/(.*)$ /_bin/file.cmo?name=$1 [PT,L,QSA]
64 RewriteRule ^/_image/(.*)$ /_bin/image.cmo?image=$1 [PT,L,QSA]
65
66 # Old _dist subdirectory no longer exists.
67 RewriteRule ^/_dist/ / [R]
68
69 # Page-related scripts.
70 RewriteRule ^/([^_].*)/diff$ /_bin/diff.cmo?page=$1 [PT,L,QSA]
71 RewriteRule ^/([^_].*)/edit$ /_bin/edit.cmo?page=$1 [PT,L,QSA]
72 RewriteRule ^/([^_].*)/editcss$ /_bin/edit_page_css_form.cmo?page=$1 [PT,L,QSA]
73 RewriteRule ^/([^_].*)/history$ /_bin/history.cmo?page=$1 [PT,L,QSA]
74 RewriteRule ^/([^_].*)/index.rss$ /_bin/rss.cmo?page=$1 [PT,L,QSA]
75 RewriteRule ^/([^_].*)/styles.css$ /_bin/pagestyle.cmo?page=$1 [PT,L,QSA]
76
77 # Serve pages.
78 RewriteRule ^/$ /_bin/page.cmo?page=index [PT,L,QSA]
79 #non-greedy matches don't parse - why?
80 #RewriteRule ^/([^_].*?)/?$ /_bin/page.cmo?page=$1 [PT,L,QSA]
81 RewriteRule ^/([^_].*[^/])/?$ /_bin/page.cmo?page=$1 [PT,L,QSA]