1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
<html>
<header>
<title>Cherokee Web Server: Server configuration</title>
<style>
body {
width: 760px;
margin: auto;
font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
font-size: small;
padding: 10px;
}
#header {
border-bottom: 2px solid #b00;
}
#toc {
border:
color: #650;
background-color: #f0e9b0;
border: 1px solid #a99d3a;
font-size: small;
-moz-border-radius: 4px;
float: right;
margin: 4px;
}
#toc a {
color: #650;
}
#toctitle {
color: #fff;
background-color: #650;
}
h1 {
border-bottom: 1px solid #b00;
float: right;
border-bottom: 0px;
}
h2 {
border-bottom: 1px solid #b00;
}
pre {
background-color: #000;
color: #ddd;
padding: 5px;
}
#footer {
border-top: 1px dotted #ddd;
color: #666;
font-size: 90%;
padding: 10px;
padding-bottom: 40px;
}
/* Merge template style */
.messagebox {
border: 1px solid #aaaaaa;
background-color: #f9f9f9;
width: 80%;
margin: 0 auto 1em auto;
padding: .2em;
text-align: justify;
}
.messagebox.merge {
border: 1px solid #cf9fff;
background-color: #f5edf5;
text-align: center;
}
.messagebox.cleanup {
border: 1px solid #9f9fff;
background-color: #efefff;
text-align: center;
}
.messagebox.standard-talk {
border: 1px solid #c0c090;
background-color: #f8eaba;
}
</style>
</header>
<body>
<h1>Server configuration</h1>
<div id="header"><img src="cherokee.png" /></div>
<p>This section describes the Cherokee configuration files format. It shows the key entries and the expected behavior of all of them.
</p>
<table id='toc' class='toc'><tr><td><div id='toctitle'><h2>Contents</h2></div>
<ul>
<li class='toclevel-1'><a href="#Binding"><span class="tocnumber">1</span> <span class="toctext">Binding</span></a></li>
<li class='toclevel-1'><a href="#IPv6_support"><span class="tocnumber">2</span> <span class="toctext">IPv6 support</span></a></li>
<li class='toclevel-1'><a href="#Execution_User_and_Group"><span class="tocnumber">3</span> <span class="toctext">Execution User and Group</span></a></li>
<li class='toclevel-1'><a href="#Document_Root"><span class="tocnumber">4</span> <span class="toctext">Document Root</span></a></li>
<li class='toclevel-1'><a href="#Directory_index_files"><span class="tocnumber">5</span> <span class="toctext">Directory index files</span></a></li>
<li class='toclevel-1'><a href="#Server_PID_file"><span class="tocnumber">6</span> <span class="toctext">Server PID file</span></a></li>
</ul>
</td></tr></table>
<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
</p>
<a name="Binding"></a><h2>Binding</h2>
<p>When the server starts it opens a port for start listening the incoming requests. By default this is the port 80. By default it will use all the network interfaces of the machine, which is usually the desired behavior. Anyway, it is possible to customize this using the <b>Port</b> and <b>Listen</b> configuration entries.
</p>
To attend port 81 instead of the port 80, just use:<pre>Port 81</pre>
It is also possible to set a listening interface. To make the server accept connections only with one of the interface, for example, 193.127.101.100 just use: <pre>Listen 193.127.101.100</pre>
<p><br />
</p>
<a name="IPv6_support"></a><h2>IPv6 support</h2>
The <b>IPv6</b> configuration key brings the possibility of activate or desactivate the IPv6 support at the server. If Cherokee has been compiled with IPv6 support, this configuration entry will be fully functional, otherwhise it will be ignored. It accepts two values: "On" and "Off". In order to desactivate IPv6 you should use:<pre>IPv6 off</pre>
<p><br />
</p>
<a name="Execution_User_and_Group"></a><h2>Execution User and Group</h2>
<p>The User directive configures which user the Cherokee daemon will normally run as. By default, Cherokee runs as root which is considered undesirable in all but the most trustful network configurations. The User directive used in conjunction with the Group directive instructs the daemon to switch to the specified user and group as quickly as possible after startup. It is only possible to change the user and/or group if the server runs initially as root, otherwhise it will change it. There are two possible formats: using the user or group name, or using the system ID.
</p>
For example, to set the User and Group to "www-data":<pre>User www-data
Group www-data</pre>
It is also possible to use a system user and/or group ID, for example:<pre>User 65534
Group 65534</pre>
<p><br />
</p>
<a name="Document_Root"></a><h2>Document Root</h2>
This directive sets the directory from which Cherokee will serve files. Unless matched other posterior rule, the server appends the path from the requested URL to the document root to make the path to the document. Example:<pre>DocumentRoot /var/www/</pre>
<p>then an access to http://www.example.com/index.html refers to /var/www/index.html.
There are methods to change this default behavior, take a look at the Directory keyword for more information.
</p><p><br />
</p>
<a name="Directory_index_files"></a><h2>Directory index files</h2>
<p>The DirectoryIndex directive sets the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name. Several URLs may be given, in which case the server will return the first one that it finds. If none of the resources exist, the server will reply according to the handler behavior.
</p>
<pre>DirectoryIndex index.html</pre>
<p>then a request for http://www.example.com/docs/ would return http://www.example.com/docs/index.html if it exists, or would list the directory if it did not.
</p>
Note that the documents do not need to be relative to the directory:<pre>DirectoryIndex index.html, index.txt, /cgi-bin/index.pl</pre> would cause the CGI script /cgi-bin/index.pl to be executed if neither index.html or index.txt existed in a directory.
<p>There is an special case in which the directory index entry starts with a slash. For example, <i>/cgi-bin/index.pl</i>. In that case, it will use it as the object accessible under that public address of the same virtual server, so it will take care about the possible configuration of the <i>/cgi-bin/</i> directory and/or the <i>pl</i> extension.
</p>
<a name="Server_PID_file"></a><h2>Server PID file</h2>
On startup, Cherokee saves the process id of the parent server process to the file cherokee.pid. Both, the feature and the filename can be changed with the PidFile directive. The process-id is for use by the administrator in restarting and terminating the daemon by sending signals to the parent process; For more information see the Stopping and Restarting page.<pre>PidFile /var/run/cherokee.pid</pre>If this configuration entry is not used, Cherokee won't write the file down.
<div id="footer"><a href="http://www.0x50.org">Cherokee</a> Web Server</div>
</body>
</html>
|