Changeset 1767
- Timestamp:
- 08/07/08 17:51:00 (4 months ago)
- Files:
-
- cherokee/trunk/doc/TOC.txt (modified) (1 diff)
- cherokee/trunk/doc/config_quickstart.txt (modified) (4 diffs)
- cherokee/trunk/doc/dev_cherokee.conf.txt (modified) (14 diffs)
- cherokee/trunk/doc/dev_debug.txt (modified) (3 diffs)
- cherokee/trunk/doc/media/css/cherokee_doc.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/doc/TOC.txt
r1765 r1767 43 43 Reference table <8> link:cookbook_reference.html[] 44 44 Optimizing Cherokee <2> link:cookbook_optimizing_cherokee.html[] 45 //// 46 45 47 . link:cookbook_cross_compilation.html[Cross compilation] 48 49 //// 46 50 Embedding Cherokee <9> link:cookbook_embedding_cherokee.html[] 47 51 Managing logs <5> link:cookbook_managing_logs.html[] <rotations and cherokee-tweak?> cherokee/trunk/doc/config_quickstart.txt
r1765 r1767 121 121 While you are at it you should also append the following line to your 122 122 `/etc/hosts` file (in Windows you will find this as 123 `%WINDIR%\system32\drivers\etc\hosts` 123 `%WINDIR%\system32\drivers\etc\hosts`). 124 124 125 125 ---- … … 130 130 `example.org` locally. Of course, once you are out in the Wild (you 131 131 know, in the Internet), you will need proper DNS records. 132 132 133 133 134 *`default`*:: … … 140 141 direction for any particular domain, the contents of your document 141 142 root directory will be exposed ('/var/www' by default unless you 142 changed that during the build process). 143 changed that during the build process). Whenever there is no match for 144 a virtual server specifically defined in your list, the `default` 145 virtual server will be the one responding. 143 146 + 144 147 Right now any file with the 'php' extension will be served after being … … 153 156 serving whatever content is requested directly, simply change the 154 157 `List & Send` handler for the `Static Content` handler. 155 156 158 157 159 cherokee/trunk/doc/dev_cherokee.conf.txt
r1740 r1767 24 24 Having said that, let's proceed to describe the configuration file format. It 25 25 is basically a text file that contains a tree where nodes 26 contain values. Let's see a basic example: 27 26 contain values. 27 28 Let's see a basic example:: 29 + 28 30 ---- 29 31 server!port = 80 … … 119 121 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 122 121 Example: 123 Example:: 124 + 122 125 ---- 123 126 server!encoder!gzip!allow = html,htm … … 179 182 specifies which is the rule type and its properties. 180 183 181 The general syntax is: 182 183 vserver ! ``order`` ! rule ! ``prioriry`` ! match 184 The general syntax is:: 185 + 186 `vserver ! order ! rule ! prioriry ! match` 184 187 185 188 The rule types plug-ins shipped within a standard Cherokee release … … 187 190 188 191 *Directory*:: 189 The directory specifies how to handle its contents. 190 191 Example: an entry with priority 20, setting the properties for the 192 *icons* directory of the default virtual host would be represented 193 by: 192 The directory specifies how to handle its contents. 193 + 194 Example: an entry with priority 20, setting the properties for the 195 *icons* directory of the default virtual host would be represented 196 by: 197 + 194 198 ---- 195 199 vserver!1!nick = default … … 199 203 200 204 *Extension*:: 201 It specifies a list of extensions and how they should be handled. 202 203 Eg: the JPG extensions is: 205 It specifies a list of extensions and how they should be handled. 206 + 207 Eg: the JPG extensions is: 208 + 204 209 ---- 205 210 vserver!1!rule!30!match!type = extensions … … 208 213 209 214 *Requests*:: 210 When a request matches a regular expression entry, it uses its configuration. 211 212 Eg: requests beginning with 'a' and PHP extension: 215 When a request matches a regular expression entry, it uses its configuration. 216 + 217 Eg: requests beginning with 'a' and PHP extension: 218 + 213 219 ----- 214 220 vserver!1!rule!40!match!type = request … … 217 223 218 224 *Header*:: 219 It tries to match a regular expression against a certain header220 entry.221 222 Eg: check whether the Referer header matches a specific host:223 225 It tries to match a regular expression against a certain header 226 entry. 227 + 228 Eg: check whether the Referer header matches a specific host: 229 + 224 230 ---- 225 231 vserver!1!rule!50!match!type = header … … 229 235 230 236 *Default*:: 231 232 This rules matches every request. There must be a default rule 233 configured at the end of the rule list to handle the requests that 234 did not match any other rule. The end of the list means the smallest 235 priority value in relative terms. It doesn't have to be `1` 236 necessarily. 237 238 Eg: Default rule for the 'default' virtual server: 239 237 This rules matches every request. There must be a default rule 238 configured at the end of the rule list to handle the requests that 239 did not match any other rule. The end of the list means the smallest 240 priority value in relative terms. It doesn't have to be `1` 241 necessarily. 242 + 243 Eg: Default rule for the 'default' virtual server: 244 + 240 245 ---- 241 246 vserver!1!rule!1!match = default … … 243 248 vserver!1!rule!1!handler!iocache = 0 244 249 ---- 245 250 + 246 251 The following parameters are concatenated with any of the previous 247 252 kinds of entry: … … 277 282 - The default virtual server uses the "common" handler as default 278 283 choice for its root directory: 279 284 + 280 285 ---- 281 286 vserver!1!nick = default … … 287 292 accessed from the local loop interface, and have to be handled as a 288 293 FastCGI: 289 294 + 290 295 ---- 291 296 vserver!5!nick = example … … 299 304 - ISO images should be handled as files and are protected by a 300 305 htdigest file using only Digest authentication: 301 306 + 302 307 ---- 303 308 vserver!1!nick = default … … 346 351 347 352 - Apache format logs to the regular files: 353 + 348 354 ---- 349 355 vserver!1!nick = default … … 360 366 Sometimes it is nice to break out your configuration into several logical files 361 367 to be more modular as well as more organized. You can use the ``include`` 362 configuration to accomplish this. Here is an example: 368 configuration to accomplish this. 369 370 Here is an example:: 371 + 363 372 ---- 364 373 include = /etc/cherokee/advanced.conf 365 374 ---- 366 or even, it is possible to specify a directory to include all of its files: 375 376 or even, it is possible to specify a directory to include all of its files:: 377 + 367 378 ---- 368 379 include = /etc/cherokee/mods-enabled/ cherokee/trunk/doc/dev_debug.txt
r1740 r1767 7 7 * To start with, if you are using gcc and you want to compile Cherokee 8 8 with debug information just execute make like this: 9 9 + 10 10 ---- 11 11 make CFLAGS="-O0 -g3" 12 12 ---- 13 14 And then you'll be able to execute gdb, cgdb, gdbtui..13 + 14 And then you'll be able to execute gdb, cgdb, gdbtui.. 15 15 16 16 * You can use autoconf to set up Cherokee to use static modules: 17 17 + 18 18 ---- 19 19 ./autogen.sh --localstatedir=/var --prefix=/usr --sysconfdir=/etc \ … … 26 26 you must add a special flag to your `configure` or `autogen.sh` 27 27 statement: 28 28 + 29 29 ---- 30 30 --enable-trace 31 31 ---- 32 + 33 This will let you trace the behavior with a human-readable output. 34 Now, when you are going to launch the web server, just add the 35 CHEROKEE_TRACE variable, with the desired options: 36 + 37 **** 38 cherokee# CHEROKEE_TRACE="common" cherokee 32 39 33 This will let you trace the behavior with a human-readable output. 34 Now, when you are going to launch the web server, just add the 35 CHEROKEE_TRACE variable, with the desired options: 40 Cherokee Web Server 0.8.0 (July 21 2008): Listening on port 80, TLS disabled 36 41 42 IPv6 enabled, using epoll, 1024 fds system limit, max. 507 connections 37 43 38 ----39 cherokee# CHEROKEE_TRACE="common" cherokee40 Cherokee Web Server 0.8.0 (July 21 2008): Listening on port 80, TLS disabled41 IPv6 enabled, using epoll, 1024 fds system limit, max. 507 connections42 44 5 threads, 206 fds per thread, standard scheduling policyhandler_common.c:0143 ( stat_file): /var/www//images/powered_by_cherokee.png, use_iocache=0 re=0 45 43 46 handler_common.c:0190 ( cherokee_handler_common_new): request: '/images/powered_by_cherokee.png', local: '/var/www//images/powered_by_cherokee.png', exists 1 47 44 48 handler_common.c:0236 ( cherokee_handler_common_new): going for handler_file 49 45 50 handler_common.c:0143 ( stat_file): /var/www//images/default-bg.png, use_iocache=0 re=0 51 46 52 handler_common.c:0190 ( cherokee_handler_common_new): request: '/images/default-bg.png', local: '/var/www//images/default-bg.png', exists 1 53 47 54 handler_common.c:0236 ( cherokee_handler_common_new): going for handler_file 55 48 56 handler_common.c:0143 ( stat_file): /var/www//images/cherokee-logo.png, use_iocache=0 re=0 57 49 58 handler_common.c:0190 ( cherokee_handler_common_new): request: '/images/cherokee-logo.png', local: '/var/www//images/cherokee-logo.png', exists 1 59 50 60 handler_common.c:0236 ( cherokee_handler_common_new): going for handler_file 51 ---- 52 53 Of course, you can trace all the modules (handlers, loggers..) you need:54 61 **** 62 + 63 Of course, you can trace all the modules (handlers, loggers..) you need: 64 + 55 65 ---- 56 66 CHEROKEE_TRACE="common,static,io_cache" /usr/bin/cherokee 57 67 CHEROKEE_TRACE="all" /usr/bin/cherokee 58 68 ---- 59 60 By default the environment variable contains a list of comma61 separated words, that point the server which parts and actions are62 interesting for your trace. Besides, there are a few special cases:63 69 + 70 By default the environment variable contains a list of comma 71 separated words, that point the server which parts and actions are 72 interesting for your trace. Besides, there are a few special cases: 73 + 64 74 - all: Activates all the trace points 65 75 - time: Prints the time at the beginning of the line … … 76 86 helps to read the tracing logs by colorizing the thread references 77 87 and highlighting the words passed through the command line. 78 79 Andexample of usage would be:80 88 + 89 An example of usage would be: 90 + 81 91 ---- 82 92 CHEROKEE_TRACE=thread,all ./cherokee | ../contrib/tracelor.py iocache 83 93 ---- 94 + 95 And it would yield an output such as the following. Even if it is 96 not terribly complicated, it is a handy script to trace the server more 97 easily. 84 98 85 And it would yield an output such as the following. Even if it is 86 not terribly complicated, it is a handy script to trace the server more 87 easily. 88 89 image::media/images/tracelor.png[Output of tracelor.py] 99 image::media/images/tracelor.png[Output of tracelor.py] cherokee/trunk/doc/media/css/cherokee_doc.css
r1765 r1767 174 174 175 175 div#preamble, 176 div. tableblock, div.imageblock, div.exampleblock, div.verseblock,176 div.imageblock, div.exampleblock, div.verseblock, 177 177 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, 178 178 div.admonitionblock { … … 181 181 // margin-top: 1.5em; 182 182 margin-bottom: 1.5em; 183 184 } 185 186 div.tableblock { 187 margin-left: 10%; 188 margin-right: 10%; 189 margin-top: 1.5em; 190 margin-bottom: 1.5em; 191 183 192 } 184 193