Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor adjustments and cleanup for some entries of the cookbook

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6457 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit 12dfa0fffbc8d9574de1adaefd90722bab047395 1 parent aa22347
taher authored
5 doc/cookbook_django.txt
View
@@ -39,6 +39,7 @@ available at the
link:http://www.cherokee-project.com/[Cherokee-Project website] to
demonstrate how easy it is to use the Django wizard.
+.Django wizard
image:media/images/screencast.png["Django wizard",
link="http://www.cherokee-project.com/screencasts.html#django_flup"]
@@ -88,6 +89,7 @@ tab inside one of your virtual servers. In this last scenario, the
Django project will be accessible under the specified web directory of
the selected virtual server.
+.Wizards
image::media/images/admin_vservers_wizard.png[Virtual Server Wizards]
Simply fill in the required fields. `Project Directory` applies to the
@@ -140,12 +142,14 @@ checkbox since it will help you determine if an error is associated
with your Django application or with Cherokee. This, however, is not
required.
+.SCGI handler
image::media/images/cookbook_django_common.png[Common CGI options]
.SCGI specific
Under `SCGI specific` make sure to add the hosts providing the
service. This is done by adding one or more information sources.
+.Django information source
image::media/images/cookbook_django_infosources.png[Information Sources]
Note that you will have to manually launch the `spawner` if
@@ -171,6 +175,7 @@ working. Just navigate to the path configured by your rule,
http://localhost/example for instance, and you should see some notes
about your recently created project.
+.It worked!
image::media/images/cookbook_django.png[Django example]
*********************************************************************
40 doc/cookbook_drupal.txt
View
@@ -192,8 +192,10 @@ First step
Regular Expression internal redirection.
+.Redirection handler
image::media/images/cookbook_drupal_dir_rules_1.png[Drupal Directory Rule]
+.Redirection handler
[options="header"]
|================================================
|Type |Regular Expression |Redirection
@@ -206,8 +208,10 @@ Second step
Regular Expression internal redirection.
+.Redirection handler
image::media/images/cookbook_drupal_dir_rules_2.png[Drupal Directory Rule]
+.Redirection handler
[options="header"]
|================================================
|Type |Regular Expression |Redirection
@@ -218,6 +222,7 @@ Third step
^^^^^^^^^^
`/blog` directory rule with custom document root set to `/var/www/drupal`
+.Custom document root
image::media/images/cookbook_drupal_dir_rules_3.png[Drupal Directory Rule]
Fourth step
@@ -231,12 +236,15 @@ expression`-type rule matching the following expression:
----
Handle this with the `HTTP error` handler:
+
+.HTTP error
[options="header"]
|=============
|Error
|403 Forbidden
|=============
+.HTTP error
image::media/images/cookbook_drupal_dir_rules_4.png[Drupal Directory Rule]
@@ -248,16 +256,41 @@ using both a `Directory` (set to `/blog`), and a `File Exist` types.
Remember to enable caching, as in the screenshot.
+.Rule for static files
image::media/images/cookbook_drupal_dir_rules_6.png[Drupal Directory Rule]
+.Rule for static files
+
+.First sub-rule
+[options="header"]
+|=================================
+|Field | Value
+|Rule type | Directory
+|Web directory| /blog
+|=================================
+
+*AND*
+
+.Second sub-rule
+[options="header"]
+|=================================
+|Rule type | File Exists
+|Match any file | Enabled
+|Use I/O cache | Enabled
+|Only match files | Enabled
+|If dir, check index files | Disabled
+|=================================
+
Sixth step
^^^^^^^^^^
The last rule related to Drupal's configuration should be a catch-all
internal redirection for a couple of regular expressions.
+.Redirection handler
image::media/images/cookbook_drupal_dir_rules_7.png[Drupal Directory Rule]
+.Redirection handler
[options="header"]
|================================================
|Type |Regular Expression |Redirection
@@ -266,9 +299,11 @@ image::media/images/cookbook_drupal_dir_rules_7.png[Drupal Directory Rule]
|================================================
-Finally, this is how your list of rules should look like. Rearrange
-yours accordingly if you seem something is wrong with your setup.
+At the end of the process you should end up with a list of 8
+rules. Rearrange from top to bottom according to the order given in
+the steps if you seem something is wrong with your setup.
+.Rule list
image::media/images/cookbook_drupal_dir_rules.png[Drupal Directory Rules]
The last one and any subsequent rules will belong to the previously
@@ -317,6 +352,7 @@ And the installation will be almost automatic. Just fill up the
requested values and you will obtain the following results once your
are through.
+.Drupal in action
image::media/images/cookbook_drupal.png[Drupal in action!]
[NOTE]
6 doc/cookbook_https_accelerator.txt
View
@@ -42,6 +42,7 @@ The front-end server would have to balance the load among them. For
that, you will first have to add as many
link:config_info_sources.html[Information Sources] as back-ends.
+.Multiple backends
image::media/images/cookbook_https_accelerator_sources.png[Back-ends]
Then you will have to configure the HTTP Reverse proxy. Visit your
@@ -49,6 +50,9 @@ front-end's virtual server through the
link:config_virtual_servers.html[vServers] section, select the
`Behavior` tab, and click on `Rule Management`. You will be able to
choose the link:modules_handlers_proxy.html[HTTP Reverse Proxy]
-handler, and set it to balance the load among all your back-ends.
+handler, and set it to balance the load among all your back-ends. In
+the example, we will allow `Keepalive` connections, and assign all the
+information sources for the defined backends.
+.HTTP Reverse Proxy balancing
image::media/images/cookbook_https_accelerator_handler.png[Back-ends]
46 doc/cookbook_maintenance.txt
View
@@ -27,32 +27,51 @@ Basic Example
The steps are fairly simple:
- Create a new virtual host, a copycat, that can handle the same
- domain(s) as the ones managed by the host to be put offline.
+ domain(s) as the ones managed by the host to be put offline. In this
+ example it is cloed as 'copy'.
+
+.Cloned virtual server
image::media/images/cookbook_maintenance_copy.png[Copycat]
- Don't forget to set up the domains handled by the virtual host.
+
+.Domains
image::media/images/cookbook_maintenance_domain.png[Domain]
++
+.Accepted Domains
+[options="header"]
+|====================================================================
+|Domain pattern
+|example.*
+|intranet_example
+|====================================================================
- Also remember setting up whatever response you will be requiring (a
custom error, some static content, and so on). We will be setting up
the link:modules_handlers_custom_error.html[HTTP error] handler to
- give a `503: Service unavailable' message.
+ give a `503: Service unavailable' message. This is done through the
+ `Handler` tab.
+
+.Handler
image::media/images/cookbook_maintenance_error.png[HTTP Error]
+
-- After setting up this way our sole rule, it should look like this:
+- After this operation, we you should have a sole rule in the copied
+ virtual server managed by the HTTP Error handler.
+
+.Rules
image::media/images/cookbook_maintenance_rule.png[Rule]
+- The `Error Handler` tab should specify `Custom redirections` in the
+ `Error Handling hook` section.
++
+.Error Handler
+image::media/images/cookbook_maintenance_result.png[Final result]
+
- Make sure the copycat is positioned above the original virtual host,
effectively having a higher priority for it. By default the new
virtual hosts are positioned on top of the rest. Just make sure you
don't inadvertently change the relative priorities.
-+
-image::media/images/cookbook_maintenance_result.png[Final result]
- Make a *graceful restart*.
@@ -87,9 +106,16 @@ the same domains.
will be the the `Default` rule that will be redirecting every
request to the first rule as an internal redirection.
+
+.Rule list
image::media/images/cookbook_maintenance_advanced_rules.png[Rules]
-- The `Default` rule should be set to redirect more or less like this:
+- The `Default` rule should be managed by the `Redirection` handler.
+.Redirections
+[cols="30%,70%",options="header"]
+|====================================================================
+|Type |Regular Expression
+|Internal |.*
+|====================================================================
+
image::media/images/cookbook_maintenance_advanced_redir.png[Default]
@@ -110,10 +136,12 @@ they can view the changes reflected while they are working.
The tweaking here has to take place in the original virtual
server. The steps are also fairly simple.
-- In this example we will be adding a new
-imaginary domain to the list of domains managed by the virtual
-host. This domain should be accessible from our intranet only.
+- In this example we will be adding a new imaginary domain to the list
+of domains managed by the virtual host. This domain should be
+accessible from our intranet only. For the purpose of this document,
+it will be we will use 'intranet_example'.
+
+.Host Matches
image::media/images/cookbook_maintenance_advanced_domains.png[Domains]
+
[NOTE]
32 doc/cookbook_php.txt
View
@@ -25,12 +25,14 @@ It requires a single operation to get PHP configured on a pre-existing
Virtual Server: Choose the virtual server your want to configure, and
click on the `Behavior` tab and trigger the `Rule panel` by clicking
on the `Rule Management` button. Once in there, use the `Add` button
-at the top of the panel to see the available wizards:
+at the top of the panel to see the available wizards.
+.Wizards
image::media/images/admin_vserver_wizard.png[Virtual Server Wizards]
Now select `Languages` and run the PHP wizard. And, that's it. If you
-had `php-cgi` installed in your system, PHP should be configured now.
+had `php-fpm` or `php-cgi` installed in your system, PHP should be
+configured now.
[[php_fastcgi]]
@@ -84,19 +86,39 @@ link:config_info_sources.html[information source] nicknamed `php` in
this case. This connects to a FastCGI server located in localhost in
port 47990. If no server is running, the webserver will run the
FastCGI server by issuing the command defined as the *Interpreter*
-sub-parameter:
+sub-parameter of the information source that is being accessed.
+.FastCGI rule sample
image::media/images/admin_handler_fastcgi1.png[Fastcgi]
+.Common CGI options in FastCGI rule
+[options="header"]
+|====================================================================
+|Checkbox | Value
+|Error Handler | Checked
+|Check file | Checked
+|Pass request | Checked
+|Allow XSendfile | Unchecked
+|====================================================================
+
This other example shows a typical usage of multiple FastCGI servers.
It connects to FastCGI servers in several locations. If no server is
running in the local computer, the webserver will run the FastCGI
server by issuing the specified command. Note that for *remote*
-FastCGI servers, you are responsible of running the FastCGI services
-there manually:
+FastCGI servers, you are responsible for running the FastCGI services
+there manually.
+.Load balancing among information sources
image::media/images/admin_handler_fastcgi2.png[Fastcgi]
+.Load balancing among information sources
+[options="header"]
+|====================================================================
+|Nick | Host
+|PHP interpreter | localhost:47990
+|PHP interpreter 2 | php2.cluster:47990
+|PHP interpreter 3 | php3.cluster:47990
+|====================================================================
[[multi-site]]
Multi-site support
16 doc/cookbook_ror.txt
View
@@ -97,6 +97,7 @@ within the specific virtual server, visiting the `Behavior` tab and
trigger the `Rule panel` by clicking on the `Rule Management`
button.
+.Wizards
image::media/images/admin_vservers_wizard.png[Virtual Server Wizards]
Now, you will have to select the `Platforms` category, and run the
@@ -107,6 +108,7 @@ vast majority of the cases. Most probably it will cover your needs,
although you are free to modify it as you will. No more configuration
is needed after this step.
+.The wizard in action
image::media/images/cookbook_ror_wizard.png[Rails Wizard]
It is usually best to proxy one or several of the servers used by
@@ -144,6 +146,7 @@ checkbox since it will help you determine if an error is associated
with your Ruby on Rails application or with Cherokee. This, however,
is not required.
+.FastCGI handler
image::media/images/cookbook_ror_common.png[Common CGI options]
.FastCGI specific
@@ -170,9 +173,18 @@ our example uses the default values to set up ports 8000 through
If any of those ports was not reachable, the `interpreter` command
would be launched and the fallen one would be reinstantiated.
-Here is a snapshot to show the creation of *ror0*. The rest are
-similar using the port variation detailed above.
+According to that table, the creation of the *ror0* information source
+would use the following settings. The rest are similar using the port
+variation detailed above.
+.ror0 information source
+[cols="15%,20%,65%",options="header"]
+|===============================================================
+|Nick |Connection |Interpreter
+|ror0 |localhost:8000 |`/home/foo/example/script/process/spawner fcgi`
+|===============================================================
+
+.ror0 information source
image::media/images/cookbook_ror_fcgi.png[FastCGI specifics]
Once everything is done you can check if Rails is really
Please sign in to comment.
Something went wrong with that request. Please try again.