1 |
<?xml version="1.0" encoding="utf-8" ?> |
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
4 |
<!-- |
5 |
This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new |
6 |
PEP, see http://www.python.org/peps/pep-0001.html for instructions and links |
7 |
to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE! |
8 |
--> |
9 |
<head> |
10 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
11 |
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> |
12 |
<title>GLEP 11 -- Web Application Installation</title> |
13 |
<style type="text/css"> |
14 |
|
15 |
/* |
16 |
:Author: David Goodger |
17 |
:Contact: goodger@users.sourceforge.net |
18 |
:date: $Date: 2006/10/10 20:25:14 $ |
19 |
:version: $Revision: 1.6 $ |
20 |
:copyright: This stylesheet has been placed in the public domain. |
21 |
|
22 |
Default cascading style sheet for the PEP HTML output of Docutils. |
23 |
*/ |
24 |
|
25 |
.first { |
26 |
margin-top: 0 } |
27 |
|
28 |
.last { |
29 |
margin-bottom: 0 } |
30 |
|
31 |
.navigation { |
32 |
width: 100% ; |
33 |
background: #cc99ff ; |
34 |
margin-top: 0px ; |
35 |
margin-bottom: 0px } |
36 |
|
37 |
.navigation .navicon { |
38 |
width: 150px ; |
39 |
height: 35px } |
40 |
|
41 |
.navigation .textlinks { |
42 |
padding-left: 1em ; |
43 |
text-align: left } |
44 |
|
45 |
.navigation td, .navigation th { |
46 |
padding-left: 0em ; |
47 |
padding-right: 0em ; |
48 |
vertical-align: middle } |
49 |
|
50 |
.rfc2822 { |
51 |
margin-top: 0.5em ; |
52 |
margin-left: 0.5em ; |
53 |
margin-right: 0.5em ; |
54 |
margin-bottom: 0em } |
55 |
|
56 |
.rfc2822 td { |
57 |
text-align: left } |
58 |
|
59 |
.rfc2822 th.field-name { |
60 |
text-align: right ; |
61 |
font-family: sans-serif ; |
62 |
padding-right: 0.5em ; |
63 |
font-weight: bold ; |
64 |
margin-bottom: 0em } |
65 |
|
66 |
a.toc-backref { |
67 |
text-decoration: none ; |
68 |
color: black } |
69 |
|
70 |
body { |
71 |
margin: 0px ; |
72 |
margin-bottom: 1em ; |
73 |
padding: 0px } |
74 |
|
75 |
dd { |
76 |
margin-bottom: 0.5em } |
77 |
|
78 |
div.section { |
79 |
margin-left: 1em ; |
80 |
margin-right: 1em ; |
81 |
margin-bottom: 1.5em } |
82 |
|
83 |
div.section div.section { |
84 |
margin-left: 0em ; |
85 |
margin-right: 0em ; |
86 |
margin-top: 1.5em } |
87 |
|
88 |
div.abstract { |
89 |
margin: 2em 5em } |
90 |
|
91 |
div.abstract p.topic-title { |
92 |
font-weight: bold ; |
93 |
text-align: center } |
94 |
|
95 |
div.attention, div.caution, div.danger, div.error, div.hint, |
96 |
div.important, div.note, div.tip, div.warning { |
97 |
margin: 2em ; |
98 |
border: medium outset ; |
99 |
padding: 1em } |
100 |
|
101 |
div.attention p.admonition-title, div.caution p.admonition-title, |
102 |
div.danger p.admonition-title, div.error p.admonition-title, |
103 |
div.warning p.admonition-title { |
104 |
color: red ; |
105 |
font-weight: bold ; |
106 |
font-family: sans-serif } |
107 |
|
108 |
div.hint p.admonition-title, div.important p.admonition-title, |
109 |
div.note p.admonition-title, div.tip p.admonition-title { |
110 |
font-weight: bold ; |
111 |
font-family: sans-serif } |
112 |
|
113 |
div.figure { |
114 |
margin-left: 2em } |
115 |
|
116 |
div.footer, div.header { |
117 |
font-size: smaller } |
118 |
|
119 |
div.footer { |
120 |
margin-left: 1em ; |
121 |
margin-right: 1em } |
122 |
|
123 |
div.system-messages { |
124 |
margin: 5em } |
125 |
|
126 |
div.system-messages h1 { |
127 |
color: red } |
128 |
|
129 |
div.system-message { |
130 |
border: medium outset ; |
131 |
padding: 1em } |
132 |
|
133 |
div.system-message p.system-message-title { |
134 |
color: red ; |
135 |
font-weight: bold } |
136 |
|
137 |
div.topic { |
138 |
margin: 2em } |
139 |
|
140 |
h1 { |
141 |
font-family: sans-serif ; |
142 |
font-size: large } |
143 |
|
144 |
h2 { |
145 |
font-family: sans-serif ; |
146 |
font-size: medium } |
147 |
|
148 |
h3 { |
149 |
font-family: sans-serif ; |
150 |
font-size: small } |
151 |
|
152 |
h4 { |
153 |
font-family: sans-serif ; |
154 |
font-style: italic ; |
155 |
font-size: small } |
156 |
|
157 |
h5 { |
158 |
font-family: sans-serif; |
159 |
font-size: x-small } |
160 |
|
161 |
h6 { |
162 |
font-family: sans-serif; |
163 |
font-style: italic ; |
164 |
font-size: x-small } |
165 |
|
166 |
.section hr { |
167 |
width: 75% } |
168 |
|
169 |
ol.simple, ul.simple { |
170 |
margin-bottom: 1em } |
171 |
|
172 |
ol.arabic { |
173 |
list-style: decimal } |
174 |
|
175 |
ol.loweralpha { |
176 |
list-style: lower-alpha } |
177 |
|
178 |
ol.upperalpha { |
179 |
list-style: upper-alpha } |
180 |
|
181 |
ol.lowerroman { |
182 |
list-style: lower-roman } |
183 |
|
184 |
ol.upperroman { |
185 |
list-style: upper-roman } |
186 |
|
187 |
p.caption { |
188 |
font-style: italic } |
189 |
|
190 |
p.credits { |
191 |
font-style: italic ; |
192 |
font-size: smaller } |
193 |
|
194 |
p.label { |
195 |
white-space: nowrap } |
196 |
|
197 |
p.topic-title { |
198 |
font-family: sans-serif ; |
199 |
font-weight: bold } |
200 |
|
201 |
pre.line-block { |
202 |
font-family: serif ; |
203 |
font-size: 100% } |
204 |
|
205 |
pre.literal-block, pre.doctest-block { |
206 |
margin-left: 2em ; |
207 |
margin-right: 2em ; |
208 |
background-color: #eeeeee } |
209 |
|
210 |
span.classifier { |
211 |
font-family: sans-serif ; |
212 |
font-style: oblique } |
213 |
|
214 |
span.classifier-delimiter { |
215 |
font-family: sans-serif ; |
216 |
font-weight: bold } |
217 |
|
218 |
span.interpreted { |
219 |
font-family: sans-serif } |
220 |
|
221 |
span.option-argument { |
222 |
font-style: italic } |
223 |
|
224 |
span.pre { |
225 |
white-space: pre } |
226 |
|
227 |
span.problematic { |
228 |
color: red } |
229 |
|
230 |
table { |
231 |
margin-top: 0.5em ; |
232 |
margin-bottom: 0.5em } |
233 |
|
234 |
td, th { |
235 |
padding-left: 0.5em ; |
236 |
padding-right: 0.5em ; |
237 |
vertical-align: top } |
238 |
|
239 |
td.num { |
240 |
text-align: right } |
241 |
|
242 |
th.field-name { |
243 |
font-weight: bold ; |
244 |
text-align: left ; |
245 |
white-space: nowrap } |
246 |
|
247 |
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { |
248 |
font-size: 100% } |
249 |
|
250 |
tt { |
251 |
background-color: #eeeeee } |
252 |
|
253 |
ul.auto-toc { |
254 |
list-style-type: none } |
255 |
|
256 |
</style> |
257 |
</head> |
258 |
<body bgcolor="white"> |
259 |
<table class="navigation" cellpadding="0" cellspacing="0" |
260 |
width="100%" border="0"> |
261 |
<tr><td class="navicon" width="150" height="35"> |
262 |
<a href="http://www.gentoo.org/" title="Gentoo Linux Home Page"> |
263 |
<img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]" |
264 |
border="0" width="150" height="35" /></a></td> |
265 |
<td class="textlinks" align="left"> |
266 |
[<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>] |
267 |
[<b><a href="http://www.gentoo.org/proj/en/glep/">GLEP Index</a></b>] |
268 |
[<b><a href="http://www.gentoo.org/proj/en/glep/glep-0011.txt">GLEP Source</a></b>] |
269 |
</td></tr></table> |
270 |
<table class="rfc2822 docutils field-list" frame="void" rules="none"> |
271 |
<col class="field-name" /> |
272 |
<col class="field-body" /> |
273 |
<tbody valign="top"> |
274 |
<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">11</td> |
275 |
</tr> |
276 |
<tr class="field"><th class="field-name">Title:</th><td class="field-body">Web Application Installation</td> |
277 |
</tr> |
278 |
<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.6</td> |
279 |
</tr> |
280 |
<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0011.txt?cvsroot=gentoo">2006/09/04 03:12:43</a></td> |
281 |
</tr> |
282 |
<tr class="field"><th class="field-name">Author:</th><td class="field-body">Troy Dack <tad at gentoo.org></td> |
283 |
</tr> |
284 |
<tr class="field"><th class="field-name">Author:</th><td class="field-body">Stuart Herbert <stuart at gentoo.org></td> |
285 |
</tr> |
286 |
<tr class="field"><th class="field-name">Discussions-To:</th><td class="field-body"><a class="reference" href="mailto:gentoo-dev@gentoo.org?subject=PEP%2011">gentoo-dev at gentoo.org</a></td> |
287 |
</tr> |
288 |
<tr class="field"><th class="field-name">Status:</th><td class="field-body">Final</td> |
289 |
</tr> |
290 |
<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td> |
291 |
</tr> |
292 |
<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="glep-0002.html">text/x-rst</a></td> |
293 |
</tr> |
294 |
<tr class="field"><th class="field-name">Created:</th><td class="field-body">02-August-2003</td> |
295 |
</tr> |
296 |
<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">07-Aug-2003, 12-Aug-2003, 13-Aug-2003, 3-Sep-2006</td> |
297 |
</tr> |
298 |
</tbody> |
299 |
</table> |
300 |
<hr /> |
301 |
<div class="contents topic"> |
302 |
<p class="topic-title first"><a id="contents" name="contents">Contents</a></p> |
303 |
<ul class="simple"> |
304 |
<li><a class="reference" href="#status" id="id7" name="id7">Status</a></li> |
305 |
<li><a class="reference" href="#credits" id="id8" name="id8">Credits</a></li> |
306 |
<li><a class="reference" href="#definitions" id="id9" name="id9">Definitions</a></li> |
307 |
<li><a class="reference" href="#conventions" id="id10" name="id10">Conventions</a></li> |
308 |
<li><a class="reference" href="#abstract" id="id11" name="id11">Abstract</a></li> |
309 |
<li><a class="reference" href="#motivation" id="id12" name="id12">Motivation</a></li> |
310 |
<li><a class="reference" href="#rationale" id="id13" name="id13">Rationale</a></li> |
311 |
<li><a class="reference" href="#implementation" id="id14" name="id14">Implementation</a><ul> |
312 |
<li><a class="reference" href="#web-server" id="id15" name="id15">1. Web Server</a><ul> |
313 |
<li><a class="reference" href="#default-document-root" id="id16" name="id16">1.1 Default Document Root</a></li> |
314 |
<li><a class="reference" href="#apache-2" id="id17" name="id17">1.2 Apache 2</a></li> |
315 |
</ul> |
316 |
</li> |
317 |
<li><a class="reference" href="#application-installation" id="id18" name="id18">2. Application Installation</a><ul> |
318 |
<li><a class="reference" href="#application-slots" id="id19" name="id19">2.1 Application SLOTs</a></li> |
319 |
<li><a class="reference" href="#installation-paths" id="id20" name="id20">2.2 Installation Paths</a></li> |
320 |
</ul> |
321 |
</li> |
322 |
<li><a class="reference" href="#virtual-host-support" id="id21" name="id21">3. Virtual Host Support</a><ul> |
323 |
<li><a class="reference" href="#new-vhost-use-flag" id="id22" name="id22">3.1 New "vhost" USE Flag</a></li> |
324 |
<li><a class="reference" href="#vhost-configuration-tool" id="id23" name="id23">3.2 VHost Configuration Tool</a></li> |
325 |
<li><a class="reference" href="#single-host-installation" id="id24" name="id24">3.3 Single Host Installation</a></li> |
326 |
<li><a class="reference" href="#virtual-host-installation" id="id25" name="id25">3.4 Virtual Host Installation</a></li> |
327 |
<li><a class="reference" href="#configuration-files" id="id26" name="id26">3.5 Configuration Files</a></li> |
328 |
</ul> |
329 |
</li> |
330 |
<li><a class="reference" href="#application-permissions" id="id27" name="id27">4. Application Permissions</a></li> |
331 |
</ul> |
332 |
</li> |
333 |
<li><a class="reference" href="#backwards-compatibility" id="id28" name="id28">Backwards Compatibility</a></li> |
334 |
<li><a class="reference" href="#references" id="id29" name="id29">References</a></li> |
335 |
<li><a class="reference" href="#copyright" id="id30" name="id30">Copyright</a></li> |
336 |
</ul> |
337 |
</div> |
338 |
<div class="section"> |
339 |
<h1><a class="toc-backref" href="#id7" id="status" name="status">Status</a></h1> |
340 |
<p>As of 2006-09-03 the webapp eclass has existed for some time.</p> |
341 |
</div> |
342 |
<div class="section"> |
343 |
<h1><a class="toc-backref" href="#id8" id="credits" name="credits">Credits</a></h1> |
344 |
<p>Based on comments posted to gentoo-dev mailing list <a class="footnote-reference" href="#webapppost1" id="id1" name="id1">[1]</a> |
345 |
<a class="footnote-reference" href="#webapppost2" id="id2" name="id2">[2]</a> <a class="footnote-reference" href="#webapppost3" id="id3" name="id3">[3]</a> by:</p> |
346 |
<blockquote> |
347 |
Stuart Herbert <stuart at gentoo.org>, Max Kalika <max at gentoo.org>, |
348 |
Robin H.Johnson <robbat2 at gentoo.org> and others</blockquote> |
349 |
</div> |
350 |
<div class="section"> |
351 |
<h1><a class="toc-backref" href="#id9" id="definitions" name="definitions">Definitions</a></h1> |
352 |
<blockquote> |
353 |
<dl class="docutils"> |
354 |
<dt><em>Web Application</em></dt> |
355 |
<dd>an application that requires a web server to function and interacts with |
356 |
the user via a browser</dd> |
357 |
<dt><em>Web Application Instance</em></dt> |
358 |
<dd>An apparent install of the Web Application that is served up via the |
359 |
webserver. There may be any number of instances per Web Application. |
360 |
This is a major use for web applications. Our Gentoo Zope setup |
361 |
already provides instances and can be used for some concepts on this |
362 |
matter.</dd> |
363 |
<dt><em>Web Application Setup Program</em></dt> |
364 |
<dd>A script similar in function to zope-config that sets up instances.</dd> |
365 |
<dt><em>Document Root</em></dt> |
366 |
<dd>a location in the file system that forms the main document tree visible from |
367 |
the web</dd> |
368 |
</dl> |
369 |
</blockquote> |
370 |
</div> |
371 |
<div class="section"> |
372 |
<h1><a class="toc-backref" href="#id10" id="conventions" name="conventions">Conventions</a></h1> |
373 |
<blockquote> |
374 |
<p>When describing the location of a directory in the file system it |
375 |
wil be shown <em>with</em> a trailing slash, eg:</p> |
376 |
<pre class="literal-block"> |
377 |
/foo/bar/ |
378 |
</pre> |
379 |
<p>When describing the location of a specific file (irrespective of any |
380 |
file extention) it will shown <em>with out</em> a trailing slash, eg:</p> |
381 |
<pre class="literal-block"> |
382 |
/foo/blah |
383 |
</pre> |
384 |
</blockquote> |
385 |
</div> |
386 |
<div class="section"> |
387 |
<h1><a class="toc-backref" href="#id11" id="abstract" name="abstract">Abstract</a></h1> |
388 |
<p>To define where and how web based applications should be installed by Gentoo.</p> |
389 |
</div> |
390 |
<div class="section"> |
391 |
<h1><a class="toc-backref" href="#id12" id="motivation" name="motivation">Motivation</a></h1> |
392 |
<p>Currently there is no standard defined regarding the installation of web |
393 |
based applicaitons in Gentoo. This leads to ebuild authors creating a |
394 |
variety of methods to determine:</p> |
395 |
<blockquote> |
396 |
<ul class="simple"> |
397 |
<li>where the application should be installed</li> |
398 |
<li>what user and permissions the application should be given</li> |
399 |
<li>where any configuration files related to the application should be |
400 |
installed.</li> |
401 |
</ul> |
402 |
</blockquote> |
403 |
<p>Due to a lack of standard install method configuration files are at |
404 |
risk of being overwritten during upgrade, potentially causing system |
405 |
administrators down tine as they have to reconfigure web applications |
406 |
after an upgrade.</p> |
407 |
</div> |
408 |
<div class="section"> |
409 |
<h1><a class="toc-backref" href="#id13" id="rationale" name="rationale">Rationale</a></h1> |
410 |
<p>A discussion on the gentoo-dev mailing list <a class="footnote-reference" href="#webapppost1" id="id4" name="id4">[1]</a> raised the |
411 |
following points regarding how Gentoo handles the installation of web based |
412 |
applications:</p> |
413 |
<blockquote> |
414 |
<ol class="arabic"> |
415 |
<li><p class="first">Gentoo installed web applications (eg: horde, phpbb, cacti, |
416 |
phpmysql) should not be installed in the Document Root of a web server.</p> |
417 |
</li> |
418 |
<li><p class="first">Web applications should not have their configuration files installed |
419 |
under the Document Root of a web server.</p> |
420 |
<blockquote> |
421 |
<ol class="lowerroman simple"> |
422 |
<li>Web Application must be slotted by their full version numbers to |
423 |
further avoid downtime when true configuration changes are required.</li> |
424 |
</ol> |
425 |
</blockquote> |
426 |
</li> |
427 |
<li><p class="first">Web applications should not be owned by the same user as the web server.</p> |
428 |
</li> |
429 |
<li><p class="first">It should be easily possible to have multiple instances of a web |
430 |
application without any duplication of source files.</p> |
431 |
</li> |
432 |
<li><p class="first">It should be immediately apparent how to control instances of a web |
433 |
application.</p> |
434 |
</li> |
435 |
</ol> |
436 |
</blockquote> |
437 |
</div> |
438 |
<div class="section"> |
439 |
<h1><a class="toc-backref" href="#id14" id="implementation" name="implementation">Implementation</a></h1> |
440 |
<p>Max Kalika <max at gentoo.org> stated that he has a preliminary eclass that |
441 |
implements a good deal of this GLEP.</p> |
442 |
<p>Stuart Herbert <stuart at gentoo.org> has committed:</p> |
443 |
<pre class="literal-block"> |
444 |
webapp-apache.eclass |
445 |
</pre> |
446 |
<p>to CVS, this is a stop-gap measure whilst this GLEP is being finalised.</p> |
447 |
<div class="section"> |
448 |
<h2><a class="toc-backref" href="#id15" id="web-server" name="web-server">1. Web Server</a></h2> |
449 |
<p>A common default web server should be selected. Selection of a default web |
450 |
server will help to reduce the number of bugs that are reported.</p> |
451 |
<p>Given the popularity of the Apache web server it is suggested that Apache be |
452 |
selected as the Gentoo default web server.</p> |
453 |
<p>The Virtual Host Configuration tool (see below) will transparently support |
454 |
different web servers, thus enabling web applications to be installed on a |
455 |
Gentoo system irrespective of the installed web server.</p> |
456 |
<div class="section"> |
457 |
<h3><a class="toc-backref" href="#id16" id="default-document-root" name="default-document-root">1.1 Default Document Root</a></h3> |
458 |
<p>The current default Document Root for Gentoo is /home/httpd/, this is |
459 |
unsuitable for a couple of reasons:</p> |
460 |
<blockquote> |
461 |
<ul class="simple"> |
462 |
<li>/home/ may be exported via nfs to numerous other hosts, it is not |
463 |
acceptable to share publically accessible files with numerous hosts.</li> |
464 |
<li>there is a potential (all be it small) for a user name clash</li> |
465 |
</ul> |
466 |
</blockquote> |
467 |
<p>To ensure the greatest flexibility when installing applications the following |
468 |
<em>Document Root</em> locations are to be used:</p> |
469 |
<blockquote> |
470 |
<ul> |
471 |
<li><p class="first">For single host installations:</p> |
472 |
<pre class="literal-block"> |
473 |
/var/www/localhost/ |
474 |
</pre> |
475 |
</li> |
476 |
<li><p class="first">For multiple virtual host installations:</p> |
477 |
<pre class="literal-block"> |
478 |
/var/www/<fully qualified domain name>/ |
479 |
|
480 |
eg: |
481 |
/var/www/www.gentoo.org/ |
482 |
</pre> |
483 |
</li> |
484 |
</ul> |
485 |
</blockquote> |
486 |
<p>Additionally the chosen location ( /var/www/ ) appears to be becoming a defacto |
487 |
standard for Linux distributions.</p> |
488 |
</div> |
489 |
<div class="section"> |
490 |
<h3><a class="toc-backref" href="#id17" id="apache-2" name="apache-2">1.2 Apache 2</a></h3> |
491 |
<p>All web application .ebuilds will honour any USE flags that are intended to |
492 |
add support for Apache 2 as well as supporting Apache 1 installations.</p> |
493 |
</div> |
494 |
</div> |
495 |
<div class="section"> |
496 |
<h2><a class="toc-backref" href="#id18" id="application-installation" name="application-installation">2. Application Installation</a></h2> |
497 |
<p>The current accepted standard Document Root in Gentoo is /home/httpd. The |
498 |
discussion suggest that this is not the best location to install web based |
499 |
applications.</p> |
500 |
<div class="section"> |
501 |
<h3><a class="toc-backref" href="#id19" id="application-slots" name="application-slots">2.1 Application SLOTs</a></h3> |
502 |
<p>All ebuilds are to set the SLOT variable as follows:</p> |
503 |
<pre class="literal-block"> |
504 |
SLOT="${PV}" |
505 |
</pre> |
506 |
<p>Setting the SLOT variable as shown will enable different versions of the same |
507 |
web application to be served concurrently by one server.</p> |
508 |
</div> |
509 |
<div class="section"> |
510 |
<h3><a class="toc-backref" href="#id20" id="installation-paths" name="installation-paths">2.2 Installation Paths</a></h3> |
511 |
<p>Web applications should be installed outside of the Document Root using the following |
512 |
defaults:</p> |
513 |
<blockquote> |
514 |
<ul> |
515 |
<li><p class="first">for files to be served to clients:</p> |
516 |
<pre class="literal-block"> |
517 |
/usr/share/webapps/${PF}/htdocs/ |
518 |
|
519 |
/usr/share/webapps/${PF}/cgi-bin/ |
520 |
</pre> |
521 |
</li> |
522 |
<li><p class="first">install <em>site default</em> configuration files in:</p> |
523 |
<pre class="literal-block"> |
524 |
/etc/webapps/${PF}/ |
525 |
</pre> |
526 |
</li> |
527 |
<li><p class="first">for documentation files (not served to clients):</p> |
528 |
<pre class="literal-block"> |
529 |
/usr/share/doc/${PF}/ |
530 |
</pre> |
531 |
</li> |
532 |
</ul> |
533 |
</blockquote> |
534 |
</div> |
535 |
</div> |
536 |
<div class="section"> |
537 |
<h2><a class="toc-backref" href="#id21" id="virtual-host-support" name="virtual-host-support">3. Virtual Host Support</a></h2> |
538 |
<p>The ability to easily configure and administer multiple virtual hosts is a |
539 |
must.</p> |
540 |
<div class="section"> |
541 |
<h3><a class="toc-backref" href="#id22" id="new-vhost-use-flag" name="new-vhost-use-flag">3.1 New "vhost" USE Flag</a></h3> |
542 |
<p>To enable support for multiple virtual host installations a new USE flag is |
543 |
to be added to Portage. The use flag will be:</p> |
544 |
<pre class="literal-block"> |
545 |
vhost |
546 |
</pre> |
547 |
<p>When <em>vhost</em> is _set_ the installation location and configuration for the web |
548 |
application will be effected, see below for more details.</p> |
549 |
</div> |
550 |
<div class="section"> |
551 |
<h3><a class="toc-backref" href="#id23" id="vhost-configuration-tool" name="vhost-configuration-tool">3.2 VHost Configuration Tool</a></h3> |
552 |
<p>To assist administration of multiple virtual hosts a "VHost Configuration Tool" |
553 |
needs to be developed and implemented. Initial discussion regarding the VHost |
554 |
Config tool and proposed usage can be found at <a class="reference" href="http://article.gmane.org/gmane.linux.gentoo.devel/10874">http://article.gmane.org/gmane.linux.gentoo.devel/10874</a>.</p> |
555 |
<p>It's the job of the VHost Config toolset to make a local instance of the web |
556 |
application run under a specific web server.</p> |
557 |
<p>The VHost Configuration Utility will need to be a seperate package, maintained by Gentoo.</p> |
558 |
<p>Web Server .ebuilds will require the VHost Config tool as a dependency (DEPEND).</p> |
559 |
<p><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=26293">Bug #26293</a> <a class="footnote-reference" href="#id5" id="id6" name="id6">[4]</a> will be used to track the initial progress of the VHost |
560 |
Configuration Tool.</p> |
561 |
<p>The vhost-config must do three main things:</p> |
562 |
<blockquote> |
563 |
<ul class="simple"> |
564 |
<li>creates directories (copies a skeleton directory for the most part).</li> |
565 |
<li>create web server vhost config files.</li> |
566 |
<li>HUP web server so it reads in the new config without stopping.</li> |
567 |
</ul> |
568 |
</blockquote> |
569 |
<p>Initially the VHost Config tool should provide support for the Apache web |
570 |
server. As the tool matures support for other web servers can be added.</p> |
571 |
</div> |
572 |
<div class="section"> |
573 |
<h3><a class="toc-backref" href="#id24" id="single-host-installation" name="single-host-installation">3.3 Single Host Installation</a></h3> |
574 |
<p>For single host installations the .ebuild will make the required |
575 |
configurations changes and symlinks using the VHost Config tool to ensure |
576 |
that the web application is available to be served from:</p> |
577 |
<pre class="literal-block"> |
578 |
/var/www/localhost/htdocs/${PF}/ |
579 |
</pre> |
580 |
<p>In this case it may be feasible for the VHost Config tool to simply symlink the |
581 |
directories from /usr/share/webapps/${PF}/ as is appropriate.</p> |
582 |
</div> |
583 |
<div class="section"> |
584 |
<h3><a class="toc-backref" href="#id25" id="virtual-host-installation" name="virtual-host-installation">3.4 Virtual Host Installation</a></h3> |
585 |
<p>For installations that support multiple virtual hosts the .ebuild will |
586 |
install the web application into the default location and then leave configuration |
587 |
to the user through the VHost Config tool.</p> |
588 |
<p>In this case the web application files will be copied from |
589 |
/usr/share/webapps/${PF}/ to /var/www/<FQDN>/ by the VHost Config tool.</p> |
590 |
</div> |
591 |
<div class="section"> |
592 |
<h3><a class="toc-backref" href="#id26" id="configuration-files" name="configuration-files">3.5 Configuration Files</a></h3> |
593 |
<p>As stated above web application <em>site default</em> configuration files are to be |
594 |
installed into:</p> |
595 |
<pre class="literal-block"> |
596 |
/etc/webapps/${PF}/ |
597 |
</pre> |
598 |
<p>The files in this directory are then copied (not symlinked!) by the VHost |
599 |
Config tool to the Document Root for each instance of the app that is installed.</p> |
600 |
<p>This will require the VHost Config toolset to emulate Portage's CONFIG_PROTECT |
601 |
behaviour for the web applications.</p> |
602 |
</div> |
603 |
</div> |
604 |
<div class="section"> |
605 |
<h2><a class="toc-backref" href="#id27" id="application-permissions" name="application-permissions">4. Application Permissions</a></h2> |
606 |
<p>Installing web applications and giving the web server ownership of the files |
607 |
is a security risk. This can possibly lead to application configuration |
608 |
files being accessed by unwanted third parties.</p> |
609 |
<p>All web applications should be owned by <em>root</em> unless the application |
610 |
absolutely requires write access to its installation directories at execution |
611 |
time.</p> |
612 |
</div> |
613 |
</div> |
614 |
<div class="section"> |
615 |
<h1><a class="toc-backref" href="#id28" id="backwards-compatibility" name="backwards-compatibility">Backwards Compatibility</a></h1> |
616 |
<p>There may be some issues regarding compatibility with existing installs of |
617 |
web applications. This is particularly true if the default Document Root is |
618 |
moved from what is accepted as the current standard (/home/httpd).</p> |
619 |
<dl class="docutils"> |
620 |
<dt>The main issues are:</dt> |
621 |
<dd><ul class="first last simple"> |
622 |
<li>transition of existing configuration files to the |
623 |
/etc/webapps/${PF}/ directory.</li> |
624 |
<li>modification/reconfiguration of applications so that they |
625 |
are aware of the location of configuration files.</li> |
626 |
<li>creating the VHost Config toolset to enable installation and |
627 |
configuration of web applications irrespective of web server.</li> |
628 |
</ul> |
629 |
</dd> |
630 |
</dl> |
631 |
</div> |
632 |
<div class="section"> |
633 |
<h1><a class="toc-backref" href="#id29" id="references" name="references">References</a></h1> |
634 |
<table class="docutils footnote" frame="void" id="webapppost1" rules="none"> |
635 |
<colgroup><col class="label" /><col /></colgroup> |
636 |
<tbody valign="top"> |
637 |
<tr><td class="label"><a name="webapppost1">[1]</a></td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id4">2</a>)</em> <a class="reference" href="http://article.gmane.org/gmane.linux.gentoo.devel/10411">http://article.gmane.org/gmane.linux.gentoo.devel/10411</a></td></tr> |
638 |
</tbody> |
639 |
</table> |
640 |
<table class="docutils footnote" frame="void" id="webapppost2" rules="none"> |
641 |
<colgroup><col class="label" /><col /></colgroup> |
642 |
<tbody valign="top"> |
643 |
<tr><td class="label"><a class="fn-backref" href="#id2" name="webapppost2">[2]</a></td><td><a class="reference" href="http://news.gmane.org/onethread.php?group=gmane.linux.gentoo.devel&root=%3C1059843010.5023.80.camel%40carbon.internal.lan%3E">http://news.gmane.org/onethread.php?group=gmane.linux.gentoo.devel&root=%3C1059843010.5023.80.camel%40carbon.internal.lan%3E</a></td></tr> |
644 |
</tbody> |
645 |
</table> |
646 |
<table class="docutils footnote" frame="void" id="webapppost3" rules="none"> |
647 |
<colgroup><col class="label" /><col /></colgroup> |
648 |
<tbody valign="top"> |
649 |
<tr><td class="label"><a class="fn-backref" href="#id3" name="webapppost3">[3]</a></td><td><a class="reference" href="http://news.gmane.org/onethread.php?group=gmane.linux.gentoo.devel&root=%3C86960000.1060038977%40valkyrie.lsit.ucsb.edu%3E">http://news.gmane.org/onethread.php?group=gmane.linux.gentoo.devel&root=%3C86960000.1060038977%40valkyrie.lsit.ucsb.edu%3E</a></td></tr> |
650 |
</tbody> |
651 |
</table> |
652 |
<table class="docutils footnote" frame="void" id="id5" rules="none"> |
653 |
<colgroup><col class="label" /><col /></colgroup> |
654 |
<tbody valign="top"> |
655 |
<tr><td class="label"><a class="fn-backref" href="#id6" name="id5">[4]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=26293">http://bugs.gentoo.org/show_bug.cgi?id=26293</a></td></tr> |
656 |
</tbody> |
657 |
</table> |
658 |
</div> |
659 |
<div class="section"> |
660 |
<h1><a class="toc-backref" href="#id30" id="copyright" name="copyright">Copyright</a></h1> |
661 |
<p>This document has been placed in the public domain.</p> |
662 |
</div> |
663 |
|
664 |
</div> |
665 |
<div class="footer"> |
666 |
<hr class="footer" /> |
667 |
<a class="reference" href="glep-0011.txt">View document source</a>. |
668 |
Generated on: 2006-10-10 20:23 UTC. |
669 |
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. |
670 |
|
671 |
</div> |
672 |
</body> |
673 |
</html> |
674 |
|