Updated translations.
[gruta.git] / INSTALL
blob91345850c0c2109edf3a47c455a797de70391f61
1 Gruta Installation Guide
2 ========================
4 Installation steps
5 ------------------
7 Install the Artemus and Grutatxt modules, available from:
9         http://triptico.com/software/artemus.html
10         http://triptico.com/software/grutatxt.html
12 If you want to use the DBI source driver, you'll need DBI and a
13 corresponding DBD, of course. SQLite is fine and probably what
14 you want.
16 Install this package:
18         $ perl Makefile.PL && make && su -c "make install"
20 Execute the `gruta-mksite' script as the user the web server daemon runs
21 as, for example `www-data' under Debian. Answer all the questions and
22 a suitable directory tree will be created. If you answer affirmatively
23 to the 'static urls' question, be sure to include the URL rewriting
24 instructions suitable to your webserver (see below).
26 Now your web server daemon should be instructed to use `g.cgi' (the
27 Gruta entry CGI program) as the directory index. Again, see below for
28 webserver configuration examples.
30 Point your browser to the URL. As it's the first time, an `admin' user
31 with a random password has been created and the program flow redirected
32 to the administration page. Select the `admin' user from the _Users_ section
33 and set a new password.
35 Create some topics. New topics will appear in the top menu. Clicking on
36 them will allow you to create new stories. If you create a topic with the
37 topic id `info', the stories with ids `about' and `legal' will be magically
38 added to the top header. For the rest of your stories, create another topic.
39 One with id `main' will be OK.
41 Webserver Configuration examples
42 --------------------------------
44 apache
45 ~~~~~~
47         # directory index
48         DirectoryIndex g.cgi
50         # protect the 'var' subdirectory (the Gruta raw
51         # storage depot) from being served via web
52         <Location /var>
53                 order allow,deny
54                 deny from all
55         </Location>
57         # static URL rewriting instructions
58         RewriteRule ^/([0-9]+)\.html$           /?t=INDEX&offset=$1             [PT,L]
59         RewriteRule ^/([0-9]+)-([0-9]+)\.html$  /?t=SEARCH_BY_DATE&from=$1&to=$2 [PT,L]
60         RewriteRule ^/tag/(.+)\.html$           /?t=SEARCH_BY_TAG&tag=$1        [PT,L]
61         RewriteRule ^/tag/$                     /?t=TAGS                        [PT,L]
62         RewriteRule ^/top/$                     /?t=TOP_TEN                     [PT,L]
63         RewriteRule ^/(.+)/$                    /?t=TOPIC&topic=$1              [PT,L]
64         RewriteRule ^/(.+)/index\.html$         /?t=TOPIC&topic=$1              [PT,L]
65         RewriteRule ^/(.+)/([0-9]+)\.html$      /?t=TOPIC&topic=$1&offset=$2    [PT,L]
66         RewriteRule ^/(.+)/(.+)\.html$          /?t=STORY&topic=$1&id=$2        [PT,L]
67         RewriteRule ^/rss\.xml$                 /?t=RSS                         [PT,L]
68         RewriteRule ^/sitemap\.xml$             /?t=SITEMAP                     [PT,L]
69         RewriteRule ^/style\.css$               /?t=CSS                         [PT,L]
71 lighttpd
72 ~~~~~~~~
74         # activate CGIs and set g.cgi as index
75         cgi.assign = ( ".cgi" => "" )
76         index-file.names = ( "g.cgi" )
78         # protect the 'var' subdirectory (the Gruta raw
79         # storage depot) from being served via web
80         url.access-deny = ( "/var" )
82         # static URL rewriting instructions
83         url.rewrite-once = (
84         "^/([0-9]+)\.html$"     =>      "/?t=INDEX;offset=$1",
85         "^/([0-9]+)-([0-9]+)\.html$" => "/?t=SEARCH_BY_DATE;from=$1;to=$2",
86         "^/tag/(.+)\.html$"     =>      "/?t=SEARCH_BY_TAG;tag=$1",
87         "^/tag/$"               =>      "/?t=TAGS",
88         "^/top/$"               =>      "/?t=TOP_TEN",
89         "^/(.+)/$"              =>      "/?t=TOPIC;topic=$1",
90         "^/(.+)/index\.html$"   =>      "/?t=TOPIC;topic=$1",
91         "^/(.+)/([0-9]+)\.html$" =>     "/?t=TOPIC;topic=$1;offset=$2",
92         "^/(.+)/(.+)\.html$"    =>      "/?t=STORY;topic=$1;id=$2",
93         "^/rss\.xml$"           =>      "/?t=RSS",
94         "^/sitemap\.xml$"       =>      "/?t=SITEMAP",
95         "^/style\.css$"         =>      "/?t=CSS"
96         )
98 ---
99 Angel Ortega <angel@triptico.com>