--- xml/htdocs/proj/en/glep/glep-0011.html 2004/01/31 21:56:55 1.5 +++ xml/htdocs/proj/en/glep/glep-0011.html 2006/10/10 20:25:14 1.6 @@ -8,9 +8,252 @@ --> - + GLEP 11 -- Web Application Installation - + -
- +
@@ -33,9 +275,9 @@ - + - + @@ -43,7 +285,7 @@ - + @@ -51,59 +293,64 @@ - +
Title:Web Application Installation
Version:1.4
Version:1.6
Last-Modified:2003/08/13 13:45:38
Last-Modified:2006/09/04 03:12:43
Author:Troy Dack <tad at gentoo.org>
Discussions-To:gentoo-dev at gentoo.org
Status:Accepted
Status:Final
Type:Standards Track
Created:02-August-2003
Post-History:07-Aug-2003, 12-Aug-2003, 13-Aug-2003
Post-History:07-Aug-2003, 12-Aug-2003, 13-Aug-2003, 3-Sep-2006

-
-

Contents

+ -
-

Credits

+
+

Status

+

As of 2006-09-03 the webapp eclass has existed for some time.

+
+
+

Credits

Based on comments posted to gentoo-dev mailing list [1] [2] [3] by:

Stuart Herbert <stuart at gentoo.org>, Max Kalika <max at gentoo.org>, Robin H.Johnson <robbat2 at gentoo.org> and others
-
-

Definitions

+
+

Definitions

-
+
Web Application
an application that requires a web server to function and interacts with the user via a browser
@@ -121,8 +368,8 @@
-
-

Conventions

+
+

Conventions

When describing the location of a directory in the file system it wil be shown with a trailing slash, eg:

@@ -136,12 +383,12 @@
-
-

Abstract

+
+

Abstract

To define where and how web based applications should be installed by Gentoo.

-
-

Motivation

+
+

Motivation

Currently there is no standard defined regarding the installation of web based applicaitons in Gentoo. This leads to ebuild authors creating a variety of methods to determine:

@@ -158,8 +405,8 @@ administrators down tine as they have to reconfigure web applications after an upgrade.

-
-

Rationale

+
+

Rationale

A discussion on the gentoo-dev mailing list [1] raised the following points regarding how Gentoo handles the installation of web based applications:

@@ -188,8 +435,8 @@
-
-

Implementation

+
+

Implementation

Max Kalika <max at gentoo.org> stated that he has a preliminary eclass that implements a good deal of this GLEP.

Stuart Herbert <stuart at gentoo.org> has committed:

@@ -197,17 +444,17 @@ webapp-apache.eclass

to CVS, this is a stop-gap measure whilst this GLEP is being finalised.

-
-

1. Web Server

-

A common default web server should be selected. Selection of a default web +

+

1. Web Server

+

A common default web server should be selected. Selection of a default web server will help to reduce the number of bugs that are reported.

-

Given the popularity of the Apache web server it is suggested that Apache be +

Given the popularity of the Apache web server it is suggested that Apache be selected as the Gentoo default web server.

The Virtual Host Configuration tool (see below) will transparently support -different web servers, thus enabling web applications to be installed on a +different web servers, thus enabling web applications to be installed on a Gentoo system irrespective of the installed web server.

-
-

1.1 Default Document Root

+
+

1.1 Default Document Root

The current default Document Root for Gentoo is /home/httpd/, this is unsuitable for a couple of reasons:

@@ -239,19 +486,19 @@

Additionally the chosen location ( /var/www/ ) appears to be becoming a defacto standard for Linux distributions.

-
-

1.2 Apache 2

+
+

1.2 Apache 2

All web application .ebuilds will honour any USE flags that are intended to add support for Apache 2 as well as supporting Apache 1 installations.

-
-

2. Application Installation

+
+

2. Application Installation

The current accepted standard Document Root in Gentoo is /home/httpd. The discussion suggest that this is not the best location to install web based applications.

-
-

2.1 Application SLOTs

+
+

2.1 Application SLOTs

All ebuilds are to set the SLOT variable as follows:

 SLOT="${PV}"
@@ -259,8 +506,8 @@
 

Setting the SLOT variable as shown will enable different versions of the same web application to be served concurrently by one server.

-
-

2.2 Installation Paths

+
+

2.2 Installation Paths

Web applications should be installed outside of the Document Root using the following defaults:

@@ -286,12 +533,12 @@
-
-

3. Virtual Host Support

+
+

3. Virtual Host Support

The ability to easily configure and administer multiple virtual hosts is a must.

-
-

3.1 New "vhost" USE Flag

+
+

3.1 New "vhost" USE Flag

To enable support for multiple virtual host installations a new USE flag is to be added to Portage. The use flag will be:

@@ -300,8 +547,8 @@
 

When vhost is _set_ the installation location and configuration for the web application will be effected, see below for more details.

-
-

3.2 VHost Configuration Tool

+
+

3.2 VHost Configuration Tool

To assist administration of multiple virtual hosts a "VHost Configuration Tool" needs to be developed and implemented. Initial discussion regarding the VHost Config tool and proposed usage can be found at http://article.gmane.org/gmane.linux.gentoo.devel/10874.

@@ -322,8 +569,8 @@

Initially the VHost Config tool should provide support for the Apache web server. As the tool matures support for other web servers can be added.

-
-

3.3 Single Host Installation

+
+

3.3 Single Host Installation

For single host installations the .ebuild will make the required configurations changes and symlinks using the VHost Config tool to ensure that the web application is available to be served from:

@@ -333,16 +580,16 @@

In this case it may be feasible for the VHost Config tool to simply symlink the directories from /usr/share/webapps/${PF}/ as is appropriate.

-
-

3.4 Virtual Host Installation

+
+

3.4 Virtual Host Installation

For installations that support multiple virtual hosts the .ebuild will install the web application into the default location and then leave configuration to the user through the VHost Config tool.

In this case the web application files will be copied from /usr/share/webapps/${PF}/ to /var/www/<FQDN>/ by the VHost Config tool.

-
-

3.5 Configuration Files

+
+

3.5 Configuration Files

As stated above web application site default configuration files are to be installed into:

@@ -354,8 +601,8 @@
 behaviour for the web applications.

-
-

4. Application Permissions

+
+

4. Application Permissions

Installing web applications and giving the web server ownership of the files is a security risk. This can possibly lead to application configuration files being accessed by unwanted third parties.

@@ -364,12 +611,12 @@ time.

-
-

Backwards Compatibility

+
+

Backwards Compatibility

There may be some issues regarding compatibility with existing installs of web applications. This is particularly true if the default Document Root is moved from what is accepted as the current standard (/home/httpd).

-
+
The main issues are:
  • transition of existing configuration files to the @@ -382,44 +629,45 @@
- - - +