| … | |
… | |
| 31 | <tbody valign="top"> |
31 | <tbody valign="top"> |
| 32 | <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">11</td> |
32 | <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">11</td> |
| 33 | </tr> |
33 | </tr> |
| 34 | <tr class="field"><th class="field-name">Title:</th><td class="field-body">Web Application Installation</td> |
34 | <tr class="field"><th class="field-name">Title:</th><td class="field-body">Web Application Installation</td> |
| 35 | </tr> |
35 | </tr> |
| 36 | <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.1</td> |
36 | <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.3</td> |
| 37 | </tr> |
37 | </tr> |
| 38 | <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">2003/08/07 19:02:40</a></td> |
38 | <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">2003/08/13 17:02:43</a></td> |
| 39 | </tr> |
39 | </tr> |
| 40 | <tr class="field"><th class="field-name">Author:</th><td class="field-body">Troy Dack <tad at gentoo.org></td> |
40 | <tr class="field"><th class="field-name">Author:</th><td class="field-body">Troy Dack <tad at gentoo.org></td> |
| 41 | </tr> |
41 | </tr> |
| 42 | <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> |
42 | <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> |
| 43 | </tr> |
43 | </tr> |
| … | |
… | |
| 47 | </tr> |
47 | </tr> |
| 48 | <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> |
48 | <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> |
| 49 | </tr> |
49 | </tr> |
| 50 | <tr class="field"><th class="field-name">Created:</th><td class="field-body">02 August 2003</td> |
50 | <tr class="field"><th class="field-name">Created:</th><td class="field-body">02 August 2003</td> |
| 51 | </tr> |
51 | </tr> |
| 52 | <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">07 Aug 2003</td> |
52 | <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">07 Aug 2003, 12 Aug 2003</td> |
| 53 | </tr> |
53 | </tr> |
| 54 | </tbody> |
54 | </tbody> |
| 55 | </table> |
55 | </table> |
| 56 | <hr /> |
56 | <hr /> |
| 57 | <div class="contents topic" id="contents"> |
57 | <div class="contents topic" id="contents"> |
| 58 | <p class="topic-title"><a name="contents">Contents</a></p> |
58 | <p class="topic-title"><a name="contents">Contents</a></p> |
| 59 | <ul class="simple"> |
59 | <ul class="simple"> |
| 60 | <li><a class="reference" href="#credits" id="id5" name="id5">Credits</a></li> |
60 | <li><a class="reference" href="#credits" id="id7" name="id7">Credits</a></li> |
| 61 | <li><a class="reference" href="#definitions" id="id6" name="id6">Definitions</a></li> |
61 | <li><a class="reference" href="#definitions" id="id8" name="id8">Definitions</a></li> |
| 62 | <li><a class="reference" href="#conventions" id="id7" name="id7">Conventions</a></li> |
62 | <li><a class="reference" href="#conventions" id="id9" name="id9">Conventions</a></li> |
| 63 | <li><a class="reference" href="#abstract" id="id8" name="id8">Abstract</a></li> |
63 | <li><a class="reference" href="#abstract" id="id10" name="id10">Abstract</a></li> |
| 64 | <li><a class="reference" href="#motivation" id="id9" name="id9">Motivation</a></li> |
64 | <li><a class="reference" href="#motivation" id="id11" name="id11">Motivation</a></li> |
| 65 | <li><a class="reference" href="#rationale" id="id10" name="id10">Rationale</a></li> |
65 | <li><a class="reference" href="#rationale" id="id12" name="id12">Rationale</a></li> |
| 66 | <li><a class="reference" href="#implementation" id="id11" name="id11">Implementation</a><ul> |
66 | <li><a class="reference" href="#implementation" id="id13" name="id13">Implementation</a><ul> |
| 67 | <li><a class="reference" href="#web-server" id="id12" name="id12">1. Web Server</a><ul> |
67 | <li><a class="reference" href="#web-server" id="id14" name="id14">1. Web Server</a><ul> |
| 68 | <li><a class="reference" href="#default-document-root" id="id13" name="id13">1.1 Default Document Root</a></li> |
68 | <li><a class="reference" href="#default-document-root" id="id15" name="id15">1.1 Default Document Root</a></li> |
| 69 | <li><a class="reference" href="#apache-2" id="id14" name="id14">1.2 Apache 2</a></li> |
69 | <li><a class="reference" href="#apache-2" id="id16" name="id16">1.2 Apache 2</a></li> |
| 70 | </ul> |
|
|
| 71 | </li> |
70 | </ul> |
|
|
71 | </li> |
|
|
72 | <li><a class="reference" href="#application-installation" id="id17" name="id17">2. Application Installation</a><ul> |
|
|
73 | <li><a class="reference" href="#application-slots" id="id18" name="id18">2.1 Application SLOTs</a></li> |
|
|
74 | <li><a class="reference" href="#installation-paths" id="id19" name="id19">2.2 Installation Paths</a></li> |
|
|
75 | </ul> |
|
|
76 | </li> |
| 72 | <li><a class="reference" href="#virtual-host-flexibility" id="id15" name="id15">2. Virtual Host Flexibility</a><ul> |
77 | <li><a class="reference" href="#virtual-host-support" id="id20" name="id20">3. Virtual Host Support</a><ul> |
| 73 | <li><a class="reference" href="#new-vhost-use-flag" id="id16" name="id16">2.1 New "vhost" USE Flag</a></li> |
78 | <li><a class="reference" href="#new-vhost-use-flag" id="id21" name="id21">3.1 New "vhost" USE Flag</a></li> |
| 74 | <li><a class="reference" href="#vhost-configuration-tool" id="id17" name="id17">2.2 VHost Configuration Tool</a></li> |
79 | <li><a class="reference" href="#vhost-configuration-tool" id="id22" name="id22">3.2 VHost Configuration Tool</a></li> |
| 75 | </ul> |
|
|
| 76 | </li> |
|
|
| 77 | <li><a class="reference" href="#application-installation-location" id="id18" name="id18">3. Application Installation Location</a><ul> |
|
|
| 78 | <li><a class="reference" href="#single-host-installation" id="id19" name="id19">3.1 Single Host Installation</a></li> |
80 | <li><a class="reference" href="#single-host-installation" id="id23" name="id23">3.3 Single Host Installation</a></li> |
| 79 | <li><a class="reference" href="#virtual-host-installation" id="id20" name="id20">3.2 Virtual Host Installation</a></li> |
81 | <li><a class="reference" href="#virtual-host-installation" id="id24" name="id24">3.4 Virtual Host Installation</a></li> |
| 80 | </ul> |
82 | <li><a class="reference" href="#configuration-files" id="id25" name="id25">3.5 Configuration Files</a></li> |
| 81 | </li> |
83 | </ul> |
| 82 | <li><a class="reference" href="#application-configuration" id="id21" name="id21">4. Application Configuration</a><ul> |
|
|
| 83 | <li><a class="reference" href="#virtual-host-support" id="id22" name="id22">4.1 Virtual Host Support</a></li> |
|
|
| 84 | </ul> |
84 | </li> |
| 85 | </li> |
|
|
| 86 | <li><a class="reference" href="#application-permissions" id="id23" name="id23">5. Application Permissions</a></li> |
85 | <li><a class="reference" href="#application-permissions" id="id26" name="id26">4. Application Permissions</a></li> |
| 87 | </ul> |
|
|
| 88 | </li> |
86 | </ul> |
|
|
87 | </li> |
| 89 | <li><a class="reference" href="#backwards-compatibility" id="id24" name="id24">Backwards Compatibility</a></li> |
88 | <li><a class="reference" href="#backwards-compatibility" id="id27" name="id27">Backwards Compatibility</a></li> |
| 90 | <li><a class="reference" href="#references" id="id25" name="id25">References</a></li> |
89 | <li><a class="reference" href="#references" id="id28" name="id28">References</a></li> |
| 91 | <li><a class="reference" href="#copyright" id="id26" name="id26">Copyright</a></li> |
90 | <li><a class="reference" href="#copyright" id="id29" name="id29">Copyright</a></li> |
| 92 | </ul> |
91 | </ul> |
| 93 | </div> |
92 | </div> |
| 94 | <div class="section" id="credits"> |
93 | <div class="section" id="credits"> |
| 95 | <h1><a class="toc-backref" href="#id5" name="credits">Credits</a></h1> |
94 | <h1><a class="toc-backref" href="#id7" name="credits">Credits</a></h1> |
| 96 | <p>Based on comments posted to gentoo-dev mailing list <a class="footnote-reference" href="#webapppost1" id="id1" name="id1">[1]</a> |
95 | <p>Based on comments posted to gentoo-dev mailing list <a class="footnote-reference" href="#webapppost1" id="id1" name="id1">[1]</a> |
| 97 | <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> |
96 | <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> |
| 98 | <blockquote> |
97 | <blockquote> |
| 99 | Stuart Herbert <<a class="reference" href="mailto:stuart@gentoo.org">stuart@gentoo.org</a>>, Max Kalika <<a class="reference" href="mailto:max@gentoo.org">max@gentoo.org</a>>, |
98 | Stuart Herbert <stuart at gentoo.org>, Max Kalika <max at gentoo.org>, |
| 100 | Robin H.Johnson <<a class="reference" href="mailto:robbat2@gentoo.org">robbat2@gentoo.org</a>> and others</blockquote> |
99 | Robin H.Johnson <robbat2 at gentoo.org> and others</blockquote> |
| 101 | </div> |
100 | </div> |
| 102 | <div class="section" id="definitions"> |
101 | <div class="section" id="definitions"> |
| 103 | <h1><a class="toc-backref" href="#id6" name="definitions">Definitions</a></h1> |
102 | <h1><a class="toc-backref" href="#id8" name="definitions">Definitions</a></h1> |
| 104 | <blockquote> |
103 | <blockquote> |
| 105 | <dl> |
104 | <dl> |
| 106 | <dt><em>Web Application</em></dt> |
105 | <dt><em>Web Application</em></dt> |
| 107 | <dd>an application that requires a web server to function and interacts with |
106 | <dd>an application that requires a web server to function and interacts with |
| 108 | the user via a browser</dd> |
107 | the user via a browser</dd> |
| … | |
… | |
| 119 | the web</dd> |
118 | the web</dd> |
| 120 | </dl> |
119 | </dl> |
| 121 | </blockquote> |
120 | </blockquote> |
| 122 | </div> |
121 | </div> |
| 123 | <div class="section" id="conventions"> |
122 | <div class="section" id="conventions"> |
| 124 | <h1><a class="toc-backref" href="#id7" name="conventions">Conventions</a></h1> |
123 | <h1><a class="toc-backref" href="#id9" name="conventions">Conventions</a></h1> |
| 125 | <blockquote> |
124 | <blockquote> |
| 126 | <p>When describing the location of a directory in the file system it |
125 | <p>When describing the location of a directory in the file system it |
| 127 | wil be shown <em>with</em> a trailing slash, eg:</p> |
126 | wil be shown <em>with</em> a trailing slash, eg:</p> |
| 128 | <pre class="literal-block"> |
127 | <pre class="literal-block"> |
| 129 | /foo/bar/ |
128 | /foo/bar/ |
| … | |
… | |
| 134 | /foo/blah |
133 | /foo/blah |
| 135 | </pre> |
134 | </pre> |
| 136 | </blockquote> |
135 | </blockquote> |
| 137 | </div> |
136 | </div> |
| 138 | <div class="section" id="abstract"> |
137 | <div class="section" id="abstract"> |
| 139 | <h1><a class="toc-backref" href="#id8" name="abstract">Abstract</a></h1> |
138 | <h1><a class="toc-backref" href="#id10" name="abstract">Abstract</a></h1> |
| 140 | <p>To define where and how web based applications should be installed by Gentoo.</p> |
139 | <p>To define where and how web based applications should be installed by Gentoo.</p> |
| 141 | </div> |
140 | </div> |
| 142 | <div class="section" id="motivation"> |
141 | <div class="section" id="motivation"> |
| 143 | <h1><a class="toc-backref" href="#id9" name="motivation">Motivation</a></h1> |
142 | <h1><a class="toc-backref" href="#id11" name="motivation">Motivation</a></h1> |
| 144 | <p>Currently there is no standard defined regarding the installation of web |
143 | <p>Currently there is no standard defined regarding the installation of web |
| 145 | based applicaitons in Gentoo. This leads to ebuild authors creating a |
144 | based applicaitons in Gentoo. This leads to ebuild authors creating a |
| 146 | variety of methods to determine:</p> |
145 | variety of methods to determine:</p> |
| 147 | <blockquote> |
146 | <blockquote> |
| 148 | <ul class="simple"> |
147 | <ul class="simple"> |
| … | |
… | |
| 156 | risk of being overwritten during upgrade, potentially causing system |
155 | risk of being overwritten during upgrade, potentially causing system |
| 157 | administrators down tine as they have to reconfigure web applications |
156 | administrators down tine as they have to reconfigure web applications |
| 158 | after an upgrade.</p> |
157 | after an upgrade.</p> |
| 159 | </div> |
158 | </div> |
| 160 | <div class="section" id="rationale"> |
159 | <div class="section" id="rationale"> |
| 161 | <h1><a class="toc-backref" href="#id10" name="rationale">Rationale</a></h1> |
160 | <h1><a class="toc-backref" href="#id12" name="rationale">Rationale</a></h1> |
| 162 | <p>A discussion on the gentoo-dev mailing list <a class="footnote-reference" href="#webapppost1" id="id4" name="id4">[1]</a> raised the |
161 | <p>A discussion on the gentoo-dev mailing list <a class="footnote-reference" href="#webapppost1" id="id4" name="id4">[1]</a> raised the |
| 163 | following points regarding how Gentoo handles the installation of web based |
162 | following points regarding how Gentoo handles the installation of web based |
| 164 | applications:</p> |
163 | applications:</p> |
| 165 | <blockquote> |
164 | <blockquote> |
| 166 | <ol class="arabic"> |
165 | <ol class="arabic"> |
| … | |
… | |
| 169 | </li> |
168 | </li> |
| 170 | <li><p class="first">Web applications should not have their configuration files installed |
169 | <li><p class="first">Web applications should not have their configuration files installed |
| 171 | under the Document Root of a web server.</p> |
170 | under the Document Root of a web server.</p> |
| 172 | <blockquote> |
171 | <blockquote> |
| 173 | <ol class="lowerroman simple"> |
172 | <ol class="lowerroman simple"> |
| 174 | <li>Web Application must be slotted by their major version numbers to |
173 | <li>Web Application must be slotted by their full version numbers to |
| 175 | further avoid downtime when true configuration changes are required.</li> |
174 | further avoid downtime when true configuration changes are required.</li> |
| 176 | </ol> |
175 | </ol> |
| 177 | </blockquote> |
176 | </blockquote> |
| 178 | </li> |
177 | </li> |
| 179 | <li><p class="first">Web applications should not be owned by the same user as the web server.</p> |
178 | <li><p class="first">Web applications should not be owned by the same user as the web server.</p> |
| … | |
… | |
| 186 | </li> |
185 | </li> |
| 187 | </ol> |
186 | </ol> |
| 188 | </blockquote> |
187 | </blockquote> |
| 189 | </div> |
188 | </div> |
| 190 | <div class="section" id="implementation"> |
189 | <div class="section" id="implementation"> |
| 191 | <h1><a class="toc-backref" href="#id11" name="implementation">Implementation</a></h1> |
190 | <h1><a class="toc-backref" href="#id13" name="implementation">Implementation</a></h1> |
| 192 | <p>Max Kalika <<a class="reference" href="mailto:max@gentoo.org">max@gentoo.org</a>> stated that he has a preliminary eclass that |
191 | <p>Max Kalika <max at gentoo.org> stated that he has a preliminary eclass that |
| 193 | implements a good deal of this GLEP.</p> |
192 | implements a good deal of this GLEP.</p> |
| 194 | <p>Stuart Herbert <<a class="reference" href="mailto:stuart@gentoo.org">stuart@gentoo.org</a>> has committed:</p> |
193 | <p>Stuart Herbert <stuart at gentoo.org> has committed:</p> |
| 195 | <pre class="literal-block"> |
194 | <pre class="literal-block"> |
| 196 | webapp-apache.eclass |
195 | webapp-apache.eclass |
| 197 | </pre> |
196 | </pre> |
| 198 | <p>to CVS, this is a stop-gap measure whilst this GLEP is being finalised.</p> |
197 | <p>to CVS, this is a stop-gap measure whilst this GLEP is being finalised.</p> |
| 199 | <div class="section" id="web-server"> |
198 | <div class="section" id="web-server"> |
| 200 | <h2><a class="toc-backref" href="#id12" name="web-server">1. Web Server</a></h2> |
199 | <h2><a class="toc-backref" href="#id14" name="web-server">1. Web Server</a></h2> |
| 201 | <p>A common default web server will have to be selected and ebuild authors should |
200 | <p>A common default web server should be selected. Selection of a default web |
| 202 | ensure that their applications contain configuration directives suitable for |
201 | server will help to reduce the number of bugs that are reported.</p> |
| 203 | that server. Given the popularity of the Apache web server it is suggested |
202 | <p>Given the popularity of the Apache web server it is suggested that Apache be |
| 204 | that Apache be selected as the Gentoo default web server.</p> |
203 | selected as the Gentoo default web server.</p> |
| 205 | <p>Whilst it is acknowledged that other web servers do exist and are used, there |
204 | <p>The Virtual Host Configuration tool (see below) will transparently support |
| 206 | has to be an assumption made somewhere that people who choose to use something |
205 | different web servers, thus enabling web applications to be installed on a |
| 207 | other than the default have enough knowledge to adapt configurations |
206 | Gentoo system irrespective of the installed web server.</p> |
| 208 | accordingly.</p> |
|
|
| 209 | <div class="section" id="default-document-root"> |
207 | <div class="section" id="default-document-root"> |
| 210 | <h3><a class="toc-backref" href="#id13" name="default-document-root">1.1 Default Document Root</a></h3> |
208 | <h3><a class="toc-backref" href="#id15" name="default-document-root">1.1 Default Document Root</a></h3> |
|
|
209 | <p>The current default Document Root for Gentoo is /home/httpd/, this is |
|
|
210 | unsuitable for a couple of reasons:</p> |
|
|
211 | <blockquote> |
|
|
212 | <ul class="simple"> |
|
|
213 | <li>/home/ may be exported via nfs to numerous other hosts, it is not |
|
|
214 | acceptable to share publically accessible files with numerous hosts.</li> |
|
|
215 | <li>there is a potential (all be it small) for a user name clash</li> |
|
|
216 | </ul> |
|
|
217 | </blockquote> |
| 211 | <p>To ensure the greatest flexibility when installing applications the following |
218 | <p>To ensure the greatest flexibility when installing applications the following |
| 212 | <em>Document Root</em> locations are to be used:</p> |
219 | <em>Document Root</em> locations are to be used:</p> |
| 213 | <blockquote> |
220 | <blockquote> |
| 214 | <ul> |
221 | <ul> |
| 215 | <li><p class="first">For single host installations:</p> |
222 | <li><p class="first">For single host installations:</p> |
| 216 | <pre class="literal-block"> |
223 | <pre class="literal-block"> |
| 217 | /var/www/localhost/htdocs/ |
224 | /var/www/localhost/ |
| 218 | </pre> |
225 | </pre> |
| 219 | </li> |
226 | </li> |
| 220 | <li><p class="first">For multiple virtual host installastions:</p> |
227 | <li><p class="first">For multiple virtual host installations:</p> |
| 221 | <pre class="literal-block"> |
228 | <pre class="literal-block"> |
| 222 | /var/www/<fully qualified domain name>/htdocs/ |
229 | /var/www/<fully qualified domain name>/ |
|
|
230 | |
| 223 | eg: |
231 | eg: |
| 224 | /var/www/www.gentoo.org/htdocs/ |
232 | /var/www/www.gentoo.org/ |
| 225 | </pre> |
233 | </pre> |
| 226 | </li> |
|
|
| 227 | </ul> |
234 | </li> |
|
|
235 | </ul> |
| 228 | </blockquote> |
236 | </blockquote> |
|
|
237 | <p>Additionally the chosen location ( /var/www/ ) appears to be becoming a defacto |
|
|
238 | standard for Linux distributions.</p> |
| 229 | </div> |
239 | </div> |
| 230 | <div class="section" id="apache-2"> |
240 | <div class="section" id="apache-2"> |
| 231 | <h3><a class="toc-backref" href="#id14" name="apache-2">1.2 Apache 2</a></h3> |
241 | <h3><a class="toc-backref" href="#id16" name="apache-2">1.2 Apache 2</a></h3> |
| 232 | <p>All web application .ebuild will honour any USE flags that are intended to |
242 | <p>All web application .ebuilds will honour any USE flags that are intended to |
| 233 | add support for Apache 2 as well as supporting Apache 1 installations.</p> |
243 | add support for Apache 2 as well as supporting Apache 1 installations.</p> |
| 234 | </div> |
244 | </div> |
| 235 | </div> |
245 | </div> |
| 236 | <div class="section" id="virtual-host-flexibility"> |
|
|
| 237 | <h2><a class="toc-backref" href="#id15" name="virtual-host-flexibility">2. Virtual Host Flexibility</a></h2> |
|
|
| 238 | <p>In a similar vein to Gentoo's Zope scripts, namely zope-config, we |
|
|
| 239 | should be able to have multiple instances of a single web application |
|
|
| 240 | without duplicating all of the files.</p> |
|
|
| 241 | <p>This also allows system administrators to control where web applications |
|
|
| 242 | will appear on their system, as well as to customize a file in a single |
|
|
| 243 | instance of a web application without effecting the original material.</p> |
|
|
| 244 | <p>This is easily acheived thru use of Apache configuration directivies and |
|
|
| 245 | symlinks. For PHP instances, see <a class="reference" href="http://tavi.sourceforge.net/VirtualHosts">http://tavi.sourceforge.net/VirtualHosts</a> |
|
|
| 246 | for some details.</p> |
|
|
| 247 | <p>The primary idea here is that to the web-application, it appears that |
|
|
| 248 | all of it's configuration and files are in the instance directory, but |
|
|
| 249 | the files are physicalled located elsewhere.</p> |
|
|
| 250 | <div class="section" id="new-vhost-use-flag"> |
|
|
| 251 | <h3><a class="toc-backref" href="#id16" name="new-vhost-use-flag">2.1 New "vhost" USE Flag</a></h3> |
|
|
| 252 | <p>To enable support for multiple virtual host installations a new USE flag is |
|
|
| 253 | to be added to Portage. The use flag will be:</p> |
|
|
| 254 | <pre class="literal-block"> |
|
|
| 255 | vhost |
|
|
| 256 | </pre> |
|
|
| 257 | <p>When <em>vhost</em> is _set_ the installation location and configuration for the web |
|
|
| 258 | application will be effected, see below for more details.</p> |
|
|
| 259 | </div> |
|
|
| 260 | <div class="section" id="vhost-configuration-tool"> |
|
|
| 261 | <h3><a class="toc-backref" href="#id17" name="vhost-configuration-tool">2.2 VHost Configuration Tool</a></h3> |
|
|
| 262 | <p>To assist administration of multiple virtual hosts a "VHost Configuration Tool" |
|
|
| 263 | needs to be developed and implemented. Initial discussion and regarding the VHost |
|
|
| 264 | Config tool 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> |
|
|
| 265 | <p>The VHost Configuration Utility will need to be a seperate package, maintained by Gentoo. |
|
|
| 266 | Apache .ebuilds will require the VHost Config tool as a dependency (DEPEND).</p> |
|
|
| 267 | <p><< TO BE EXPANDED UPON >></p> |
|
|
| 268 | </div> |
|
|
| 269 | </div> |
|
|
| 270 | <div class="section" id="application-installation-location"> |
246 | <div class="section" id="application-installation"> |
| 271 | <h2><a class="toc-backref" href="#id18" name="application-installation-location">3. Application Installation Location</a></h2> |
247 | <h2><a class="toc-backref" href="#id17" name="application-installation">2. Application Installation</a></h2> |
| 272 | <p>The current accepted standard Document Root in Gentoo is /home/httpd. The |
248 | <p>The current accepted standard Document Root in Gentoo is /home/httpd. The |
| 273 | discussion suggest that this is not the best location to install web based |
249 | discussion suggest that this is not the best location to install web based |
| 274 | applications.</p> |
250 | applications.</p> |
|
|
251 | <div class="section" id="application-slots"> |
|
|
252 | <h3><a class="toc-backref" href="#id18" name="application-slots">2.1 Application SLOTs</a></h3> |
|
|
253 | <p>All ebuilds are to set the SLOT variable as follows:</p> |
|
|
254 | <pre class="literal-block"> |
|
|
255 | SLOT="${PV}" |
|
|
256 | </pre> |
|
|
257 | <p>Setting the SLOT variable as shown will enable different versions of the same |
|
|
258 | web application to be served concurrently by one server.</p> |
|
|
259 | </div> |
|
|
260 | <div class="section" id="installation-paths"> |
|
|
261 | <h3><a class="toc-backref" href="#id19" name="installation-paths">2.2 Installation Paths</a></h3> |
| 275 | <p>Web applications should be installed outside of the Document Root using the following |
262 | <p>Web applications should be installed outside of the Document Root using the following |
| 276 | defaults:</p> |
263 | defaults:</p> |
| 277 | <blockquote> |
264 | <blockquote> |
| 278 | <ul> |
265 | <ul> |
| 279 | <li><p class="first">for files to be served to clients:</p> |
266 | <li><p class="first">for files to be served to clients:</p> |
| 280 | <pre class="literal-block"> |
267 | <pre class="literal-block"> |
| 281 | /usr/share/webapps/${PF}/ |
268 | /usr/share/webapps/${PF}/htdocs/ |
| 282 | |
269 | |
| 283 | /usr/share/webapps/${PF}/public_html/ for files served by the web server |
|
|
| 284 | |
|
|
| 285 | /usr/share/webapps/${PF}/cgi-bin/ for CGI-BIN files |
270 | /usr/share/webapps/${PF}/cgi-bin/ |
| 286 | </pre> |
271 | </pre> |
| 287 | </li> |
272 | </li> |
| 288 | <li><p class="first">install configuration files in:</p> |
273 | <li><p class="first">install <em>site default</em> configuration files in:</p> |
| 289 | <pre class="literal-block"> |
274 | <pre class="literal-block"> |
| 290 | /etc/webapps/${PF}/ |
275 | /etc/webapps/${PF}/ |
| 291 | </pre> |
276 | </pre> |
| 292 | </li> |
277 | </li> |
| 293 | <li><p class="first">for documentation files (not served to clients):</p> |
278 | <li><p class="first">for documentation files (not served to clients):</p> |
| … | |
… | |
| 295 | /usr/share/doc/${PF}/ |
280 | /usr/share/doc/${PF}/ |
| 296 | </pre> |
281 | </pre> |
| 297 | </li> |
282 | </li> |
| 298 | </ul> |
283 | </ul> |
| 299 | </blockquote> |
284 | </blockquote> |
|
|
285 | </div> |
|
|
286 | </div> |
|
|
287 | <div class="section" id="virtual-host-support"> |
|
|
288 | <h2><a class="toc-backref" href="#id20" name="virtual-host-support">3. Virtual Host Support</a></h2> |
|
|
289 | <p>The ability to easily configure and administer multiple virtual hosts is a |
|
|
290 | must.</p> |
|
|
291 | <div class="section" id="new-vhost-use-flag"> |
|
|
292 | <h3><a class="toc-backref" href="#id21" name="new-vhost-use-flag">3.1 New "vhost" USE Flag</a></h3> |
|
|
293 | <p>To enable support for multiple virtual host installations a new USE flag is |
|
|
294 | to be added to Portage. The use flag will be:</p> |
|
|
295 | <pre class="literal-block"> |
|
|
296 | vhost |
|
|
297 | </pre> |
|
|
298 | <p>When <em>vhost</em> is _set_ the installation location and configuration for the web |
|
|
299 | application will be effected, see below for more details.</p> |
|
|
300 | </div> |
|
|
301 | <div class="section" id="vhost-configuration-tool"> |
|
|
302 | <h3><a class="toc-backref" href="#id22" name="vhost-configuration-tool">3.2 VHost Configuration Tool</a></h3> |
|
|
303 | <p>To assist administration of multiple virtual hosts a "VHost Configuration Tool" |
|
|
304 | needs to be developed and implemented. Initial discussion regarding the VHost |
|
|
305 | 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> |
|
|
306 | <p>It's the job of the VHost Config toolset to make a local instance of the web |
|
|
307 | application run under a specific web server.</p> |
|
|
308 | <p>The VHost Configuration Utility will need to be a seperate package, maintained by Gentoo.</p> |
|
|
309 | <p>Web Server .ebuilds will require the VHost Config tool as a dependency (DEPEND).</p> |
|
|
310 | <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 |
|
|
311 | Configuration Tool.</p> |
|
|
312 | <p>The vhost-config must do three main things:</p> |
|
|
313 | <blockquote> |
|
|
314 | <ul class="simple"> |
|
|
315 | <li>creates directories (copies a skeleton directory for the most part).</li> |
|
|
316 | <li>create web server vhost config files.</li> |
|
|
317 | <li>HUP web server so it reads in the new config without stopping.</li> |
|
|
318 | </ul> |
|
|
319 | </blockquote> |
|
|
320 | <p>Initially the VHost Config tool should provide support for the Apache web |
|
|
321 | server. As the tool matures support for other web servers can be added.</p> |
|
|
322 | </div> |
| 300 | <div class="section" id="single-host-installation"> |
323 | <div class="section" id="single-host-installation"> |
| 301 | <h3><a class="toc-backref" href="#id19" name="single-host-installation">3.1 Single Host Installation</a></h3> |
324 | <h3><a class="toc-backref" href="#id23" name="single-host-installation">3.3 Single Host Installation</a></h3> |
| 302 | <p>For single host installations the .ebuild will make the required |
325 | <p>For single host installations the .ebuild will make the required |
| 303 | configurations changes and symlinks using the VHost Config tool to ensure |
326 | configurations changes and symlinks using the VHost Config tool to ensure |
| 304 | that the web application is available to be served from:</p> |
327 | that the web application is available to be served from:</p> |
| 305 | <pre class="literal-block"> |
328 | <pre class="literal-block"> |
| 306 | /var/www/localhost/htdocs/${PN} |
329 | /var/www/localhost/htdocs/${PF}/ |
| 307 | </pre> |
330 | </pre> |
|
|
331 | <p>In this case it may be feasible for the VHost Config tool to simply symlink the |
|
|
332 | directories from /usr/share/webapps/${PF}/ as is appropriate.</p> |
| 308 | </div> |
333 | </div> |
| 309 | <div class="section" id="virtual-host-installation"> |
334 | <div class="section" id="virtual-host-installation"> |
| 310 | <h3><a class="toc-backref" href="#id20" name="virtual-host-installation">3.2 Virtual Host Installation</a></h3> |
335 | <h3><a class="toc-backref" href="#id24" name="virtual-host-installation">3.4 Virtual Host Installation</a></h3> |
| 311 | <p>For installations that support multiple virtual hosts the .ebuild will |
336 | <p>For installations that support multiple virtual hosts the .ebuild will |
| 312 | install the web application into the default location and then leave configuration |
337 | install the web application into the default location and then leave configuration |
| 313 | to the user through the VHost Config tool.</p> |
338 | to the user through the VHost Config tool.</p> |
| 314 | <p><< TO BE EXPANDED UPON >></p> |
339 | <p>In this case the web application files will be copied from |
|
|
340 | /usr/share/webapps/${PF}/ to /var/www/<FQDN>/ by the VHost Config tool.</p> |
| 315 | </div> |
341 | </div> |
| 316 | </div> |
|
|
| 317 | <div class="section" id="application-configuration"> |
342 | <div class="section" id="configuration-files"> |
| 318 | <h2><a class="toc-backref" href="#id21" name="application-configuration">4. Application Configuration</a></h2> |
343 | <h3><a class="toc-backref" href="#id25" name="configuration-files">3.5 Configuration Files</a></h3> |
| 319 | <p>Having application configuration files in the Document Root of a web |
|
|
| 320 | server is a potential security risk. Additionally given the way that many |
|
|
| 321 | ebuilds currently install web applications it can also lead to the |
|
|
| 322 | overwriting of important configuration files.</p> |
|
|
| 323 | <p>As stated above web application configuration files are to be installed into:</p> |
344 | <p>As stated above web application <em>site default</em> configuration files are to be |
|
|
345 | installed into:</p> |
| 324 | <pre class="literal-block"> |
346 | <pre class="literal-block"> |
| 325 | /etc/webapps/${PF}/ |
347 | /etc/webapps/${PF}/ |
| 326 | </pre> |
348 | </pre> |
| 327 | <p>By installing application configuration files in /etc Portage CONFIG_PROTECT |
349 | <p>The files in this directory are then copied (not symlinked!) by the VHost |
| 328 | features can be used to ensure that configuration files are not overwritten.</p> |
350 | Config tool to the Document Root for each instance of the app that is installed.</p> |
| 329 | <div class="section" id="virtual-host-support"> |
351 | <p>This will require the VHost Config toolset to emulate Portage's CONFIG_PROTECT |
| 330 | <h3><a class="toc-backref" href="#id22" name="virtual-host-support">4.1 Virtual Host Support</a></h3> |
352 | behaviour for the web applications.</p> |
| 331 | <p><< TO BE EXPANDED UPON >></p> |
|
|
| 332 | </div> |
353 | </div> |
| 333 | </div> |
354 | </div> |
| 334 | <div class="section" id="application-permissions"> |
355 | <div class="section" id="application-permissions"> |
| 335 | <h2><a class="toc-backref" href="#id23" name="application-permissions">5. Application Permissions</a></h2> |
356 | <h2><a class="toc-backref" href="#id26" name="application-permissions">4. Application Permissions</a></h2> |
| 336 | <p>Installing web applications and giving the web server ownership of the files |
357 | <p>Installing web applications and giving the web server ownership of the files |
| 337 | is a security risk. This can possibly lead to application configuration |
358 | is a security risk. This can possibly lead to application configuration |
| 338 | files being accessed by unwanted third parties.</p> |
359 | files being accessed by unwanted third parties.</p> |
| 339 | <p>All web applications should be owned by <em>root</em> unless the application |
360 | <p>All web applications should be owned by <em>root</em> unless the application |
| 340 | absolutely requires write access to its installation directories at execution |
361 | absolutely requires write access to its installation directories at execution |
| 341 | time.</p> |
362 | time.</p> |
| 342 | </div> |
363 | </div> |
| 343 | </div> |
364 | </div> |
| 344 | <div class="section" id="backwards-compatibility"> |
365 | <div class="section" id="backwards-compatibility"> |
| 345 | <h1><a class="toc-backref" href="#id24" name="backwards-compatibility">Backwards Compatibility</a></h1> |
366 | <h1><a class="toc-backref" href="#id27" name="backwards-compatibility">Backwards Compatibility</a></h1> |
| 346 | <p>There may be some issues regarding compatibility with existing installs of |
367 | <p>There may be some issues regarding compatibility with existing installs of |
| 347 | web applications. This is particularly true if the default Document Root is |
368 | web applications. This is particularly true if the default Document Root is |
| 348 | moved from what is accepted as the current standard (/home/httpd).</p> |
369 | moved from what is accepted as the current standard (/home/httpd).</p> |
| 349 | <dl> |
370 | <dl> |
| 350 | <dt>The main issues are:</dt> |
371 | <dt>The main issues are:</dt> |
| 351 | <dd><ul class="first last simple"> |
372 | <dd><ul class="first last simple"> |
| 352 | <li>transition of existing configuration files to the |
373 | <li>transition of existing configuration files to the |
| 353 | /etc/webapps/${PF}/ directory.</li> |
374 | /etc/webapps/${PF}/ directory.</li> |
| 354 | <li>modification/reconfiguration of applications so that they |
375 | <li>modification/reconfiguration of applications so that they |
| 355 | are aware of the location of configuration files.</li> |
376 | are aware of the location of configuration files.</li> |
| 356 | <li>creating approriate Apache configuration snippets for inclusion |
377 | <li>creating the VHost Config toolset to enable installation and |
| 357 | in the Apache configuration files.</li> |
378 | configuration of web applications irrespective of web server.</li> |
| 358 | </ul> |
379 | </ul> |
| 359 | </dd> |
380 | </dd> |
| 360 | </dl> |
381 | </dl> |
| 361 | </div> |
382 | </div> |
| 362 | <div class="section" id="references"> |
383 | <div class="section" id="references"> |
| 363 | <h1><a class="toc-backref" href="#id25" name="references">References</a></h1> |
384 | <h1><a class="toc-backref" href="#id28" name="references">References</a></h1> |
| 364 | <table class="footnote" frame="void" id="webapppost1" rules="none"> |
385 | <table class="footnote" frame="void" id="webapppost1" rules="none"> |
| 365 | <colgroup><col class="label" /><col /></colgroup> |
386 | <colgroup><col class="label" /><col /></colgroup> |
| 366 | <tbody valign="top"> |
387 | <tbody valign="top"> |
| 367 | <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> |
388 | <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> |
| 368 | </tbody> |
389 | </tbody> |
| … | |
… | |
| 377 | <colgroup><col class="label" /><col /></colgroup> |
398 | <colgroup><col class="label" /><col /></colgroup> |
| 378 | <tbody valign="top"> |
399 | <tbody valign="top"> |
| 379 | <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> |
400 | <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> |
| 380 | </tbody> |
401 | </tbody> |
| 381 | </table> |
402 | </table> |
|
|
403 | <table class="footnote" frame="void" id="id5" rules="none"> |
|
|
404 | <colgroup><col class="label" /><col /></colgroup> |
|
|
405 | <tbody valign="top"> |
|
|
406 | <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> |
|
|
407 | </tbody> |
|
|
408 | </table> |
| 382 | </div> |
409 | </div> |
| 383 | <div class="section" id="copyright"> |
410 | <div class="section" id="copyright"> |
| 384 | <h1><a class="toc-backref" href="#id26" name="copyright">Copyright</a></h1> |
411 | <h1><a class="toc-backref" href="#id29" name="copyright">Copyright</a></h1> |
| 385 | <p>This document has been placed in the public domain.</p> |
412 | <p>This document has been placed in the public domain.</p> |
| 386 | </div> |
413 | </div> |
| 387 | </div> |
414 | </div> |
| 388 | |
415 | |
| 389 | <hr class="footer"/> |
416 | <hr class="footer"/> |
| 390 | <div class="footer"> |
417 | <div class="footer"> |
| 391 | <a class="reference" href="glep-0011.txt">View document source</a>. |
418 | <a class="reference" href="glep-0011.txt">View document source</a>. |
| 392 | Generated on: 2003-08-07 19:02 UTC. |
419 | Generated on: 2003-08-13 08:25 UTC. |
| 393 | 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. |
420 | 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. |
| 394 | </div> |
421 | </div> |
| 395 | </body> |
422 | </body> |
| 396 | </html> |
423 | </html> |
| 397 | |
424 | |