An zc buildout for build and configure apache
Project description
.. contents::
- Code repository: https://svn.plone.org/svn/collective/buildout/plone.recipe.apache
Change history
**************
=========
CHANGES
=========
0.3.1 (2009-08-13)
==================
- Fix bug that prevented baked-in configure options like
--enable-rewrite from being passed to superclass.
Allow other (e.g., non-module) options to be specified in
superclass's 'extra_options' variable.
[cshenton]
- Take the port to bind apache to from the buildout options, instead
of assigning 80 unconditionally. Fixes launchpad bug #384874.
[servilio (kept from trunk before merging 0.3.1 by cshenton)]
0.3.0 (2008-11-11)
==================
- Added support for including extra directives into the generated vhost
configuration.
[witsch]
- Added support for permanent redirects (hostname normalization).
[naro]
- Added support for static resource directories and gzip compression
[dreamcatcher]
0.2.1 (2008-07-02)
==================
- fix Cheetah require in setup.py [yboussard]
0.2.0 (2008-06-30)
==================
- Add log_format option to configure apache log [yboussard]
0.1.0 (2008-04-27)
==================
- Created recipe with ZopeSkel [Paris sprint 2008].
Detailed Documentation
**********************
Building
********
Supported options
=================
The recipe supports the following options:
url
URL for an archive containing the Squid sources. Either **url** or
**svn** has to be specified.
svn
URL for a subversion repository containing Aapache sources. Either **url**
or **svn** has to be specified.
modules
Here you you can specify the extra modules that you want apache to
be compiled with. Each module goes in one line. The module names
prepended with '--enable-' will be appended to the 'configure'
command before compiling. For example, module 'ssl' becomes
configure option '--enable-ssl'.
extra_options
Since this recipe's 'build' entry-point subclasses zc.recipe.cmmi,
we can pass other options to the 'configure' command, in addition
to any 'modules' specified above. This allows you to specify
non-module options like '--with-mpm=worker' or '--with-port=8888'.
Example usage
=============
We'll start by creating a buildout that uses the recipe::
>>> write('buildout.cfg',
... """
... [buildout]
... parts = apachebuild
...
... [apachebuild]
... recipe = plone.recipe.apache:build
... url = http://apache.multidist.com/httpd/httpd-2.2.10.tar.gz
... """ )
Running the buildout gives us::
>>> print system(buildout)
Installing apachebuild.
apachebuild: Downloading apache tarball.
apachebuild: Compiling Apache
...
Configuration
*************
Supported options
=================
The recipe supports the following options:
mainconfig
location of apache configuration (ex: /etc/apache2/apache2.conf). if no
value is provided we use the location of the config file from build recipe
bind
Hostname and port on which Apache will listen for requests.
Syntax is [hostname][:port]. Defaults to 80.
If hostname is omitted then Apache will bind to all available
interfaces.
backends
Specifies the backend or backends which will process the
requests. The syntax for backends::
<hostname>[/<path>]:<ip address>:<port>
If multiple backends are specified then each backend must include
a hostname.
zope2_vhm_map
Defines a virtual host mapping for Zope servers. This is a list of
**hostname:ZODB location** entries which specify the location inside
Zope where the website for a virtual host lives.
The syntax for zope servers:
<hostname>:<path>
log_format
Specify the log format of apache (combined, common) , common is the default
etag
Specify the format of the ETag to be generated (if any, eg: "MTime Size")
resources
Specify directories to be mapped within the virtual host as static
resource directories. For example::
images:%{buildout:directory}/parts/my.theme/browser/images
css:%{buildout:directory}/parts/my.theme/browser/css
js:%{buildout:directory}/parts/my.theme/browser/js
resource-expires
Configure expires for static resources matching a certain filename
pattern. For example::
\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$:"access plus 2 days"
resource-headers:
Configure extra headers for static resources matching a certain filename
pattern. For example::
\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$:Cache-Control:"max-age=172800, public, must-revalidate"
redirects:
Defines apache VirtualHost redirect. This is a list of
**hostname:target_hostname** entries. Redirect is always permanent and
redirects root folder only.
target_hostname must match hostname defined in backends.
For example:
www.plone.org:plone.org
(in this case all requests to www.plone.org are redirected to plone.org
which has to be defined in backends parameter)
extras
Specify extra options to be included in the generated vhost configuration.
Example usage
=============
We'll start by creating a buildout that uses the recipe::
>>> write('buildout.cfg',
... """
... [buildout]
... parts = apacheconfig
...
... [apacheconfig]
... recipe = plone.recipe.apache:config
... mainconfig = /usr/local/apache/config/httpd.conf
... bind = 80
... backends = plone.org:127.0.0.1:3128
... zope2_vhm_map = plone.org:/plone
... redirects = www.plone.org:plone.org
... resources =
... docs:${buildout:directory}/plone/recipe/apache/doctests
... tests:${buildout:directory}/plone/recipe/apache/doctests
... resource-expires =
... \.(txt)$:"access plus 1 day"
... \.(py)$:"access plus 2 weeks"
... resource-headers =
... \.(txt|py)$:Cache-Control:"max-age=3600, public, must-revalidate"
... """)
Running the buildout gives us::
>>> print system(buildout)
Installing apacheconfig.
...
Contributors
************
Paris sprint 2008, Author
Carsten Rebbien
Youenn Boussard
Sidnei da Silva from Enfold Systems, Inc. added support for serving
Static Resources with Gzip Compression.
Chris Shenton koansys.com
Fixing configure bugs, allowing extra_options
Download
********
- Code repository: https://svn.plone.org/svn/collective/buildout/plone.recipe.apache
Change history
**************
=========
CHANGES
=========
0.3.1 (2009-08-13)
==================
- Fix bug that prevented baked-in configure options like
--enable-rewrite from being passed to superclass.
Allow other (e.g., non-module) options to be specified in
superclass's 'extra_options' variable.
[cshenton]
- Take the port to bind apache to from the buildout options, instead
of assigning 80 unconditionally. Fixes launchpad bug #384874.
[servilio (kept from trunk before merging 0.3.1 by cshenton)]
0.3.0 (2008-11-11)
==================
- Added support for including extra directives into the generated vhost
configuration.
[witsch]
- Added support for permanent redirects (hostname normalization).
[naro]
- Added support for static resource directories and gzip compression
[dreamcatcher]
0.2.1 (2008-07-02)
==================
- fix Cheetah require in setup.py [yboussard]
0.2.0 (2008-06-30)
==================
- Add log_format option to configure apache log [yboussard]
0.1.0 (2008-04-27)
==================
- Created recipe with ZopeSkel [Paris sprint 2008].
Detailed Documentation
**********************
Building
********
Supported options
=================
The recipe supports the following options:
url
URL for an archive containing the Squid sources. Either **url** or
**svn** has to be specified.
svn
URL for a subversion repository containing Aapache sources. Either **url**
or **svn** has to be specified.
modules
Here you you can specify the extra modules that you want apache to
be compiled with. Each module goes in one line. The module names
prepended with '--enable-' will be appended to the 'configure'
command before compiling. For example, module 'ssl' becomes
configure option '--enable-ssl'.
extra_options
Since this recipe's 'build' entry-point subclasses zc.recipe.cmmi,
we can pass other options to the 'configure' command, in addition
to any 'modules' specified above. This allows you to specify
non-module options like '--with-mpm=worker' or '--with-port=8888'.
Example usage
=============
We'll start by creating a buildout that uses the recipe::
>>> write('buildout.cfg',
... """
... [buildout]
... parts = apachebuild
...
... [apachebuild]
... recipe = plone.recipe.apache:build
... url = http://apache.multidist.com/httpd/httpd-2.2.10.tar.gz
... """ )
Running the buildout gives us::
>>> print system(buildout)
Installing apachebuild.
apachebuild: Downloading apache tarball.
apachebuild: Compiling Apache
...
Configuration
*************
Supported options
=================
The recipe supports the following options:
mainconfig
location of apache configuration (ex: /etc/apache2/apache2.conf). if no
value is provided we use the location of the config file from build recipe
bind
Hostname and port on which Apache will listen for requests.
Syntax is [hostname][:port]. Defaults to 80.
If hostname is omitted then Apache will bind to all available
interfaces.
backends
Specifies the backend or backends which will process the
requests. The syntax for backends::
<hostname>[/<path>]:<ip address>:<port>
If multiple backends are specified then each backend must include
a hostname.
zope2_vhm_map
Defines a virtual host mapping for Zope servers. This is a list of
**hostname:ZODB location** entries which specify the location inside
Zope where the website for a virtual host lives.
The syntax for zope servers:
<hostname>:<path>
log_format
Specify the log format of apache (combined, common) , common is the default
etag
Specify the format of the ETag to be generated (if any, eg: "MTime Size")
resources
Specify directories to be mapped within the virtual host as static
resource directories. For example::
images:%{buildout:directory}/parts/my.theme/browser/images
css:%{buildout:directory}/parts/my.theme/browser/css
js:%{buildout:directory}/parts/my.theme/browser/js
resource-expires
Configure expires for static resources matching a certain filename
pattern. For example::
\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$:"access plus 2 days"
resource-headers:
Configure extra headers for static resources matching a certain filename
pattern. For example::
\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$:Cache-Control:"max-age=172800, public, must-revalidate"
redirects:
Defines apache VirtualHost redirect. This is a list of
**hostname:target_hostname** entries. Redirect is always permanent and
redirects root folder only.
target_hostname must match hostname defined in backends.
For example:
www.plone.org:plone.org
(in this case all requests to www.plone.org are redirected to plone.org
which has to be defined in backends parameter)
extras
Specify extra options to be included in the generated vhost configuration.
Example usage
=============
We'll start by creating a buildout that uses the recipe::
>>> write('buildout.cfg',
... """
... [buildout]
... parts = apacheconfig
...
... [apacheconfig]
... recipe = plone.recipe.apache:config
... mainconfig = /usr/local/apache/config/httpd.conf
... bind = 80
... backends = plone.org:127.0.0.1:3128
... zope2_vhm_map = plone.org:/plone
... redirects = www.plone.org:plone.org
... resources =
... docs:${buildout:directory}/plone/recipe/apache/doctests
... tests:${buildout:directory}/plone/recipe/apache/doctests
... resource-expires =
... \.(txt)$:"access plus 1 day"
... \.(py)$:"access plus 2 weeks"
... resource-headers =
... \.(txt|py)$:Cache-Control:"max-age=3600, public, must-revalidate"
... """)
Running the buildout gives us::
>>> print system(buildout)
Installing apacheconfig.
...
Contributors
************
Paris sprint 2008, Author
Carsten Rebbien
Youenn Boussard
Sidnei da Silva from Enfold Systems, Inc. added support for serving
Static Resources with Gzip Compression.
Chris Shenton koansys.com
Fixing configure bugs, allowing extra_options
Download
********
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plone.recipe.apache-0.3.1.tar.gz
(11.3 kB
view hashes)
Built Distribution
Close
Hashes for plone.recipe.apache-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ceca462a3667b8b4d4f3fb8eaffef9fe1e1454e5d7cd267e71a766327d7c6b |
|
MD5 | cf2411f55cbb69aac0d18c0fe39ffcf3 |
|
BLAKE2b-256 | 789545c014a40de63ebc643c08828fa4c6f6aff1be4eab45e8a07bae23af062c |
Close
Hashes for plone.recipe.apache-0.3.1-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a9c3718c0630a4ace730116c866981060c398ef7ca42d4b422c0d38493a2318 |
|
MD5 | 4271c29c306e172739d9a5b60cfd3cde |
|
BLAKE2b-256 | 5ebd15c79b4e61044d9e09c95f01495d11825e8ff17f46732bf78edb69415aa4 |