用于设置ApacheWeb服务器环境的zc.buildout方法。
tl.buildout_apache的Python项目详细描述
tl.buildout_阿帕奇
这是用于设置Apache web server环境的zc.buildout食谱的集合。它提供以下入口点:
httpd: | Builds the Apache HTTP server software from source. |
---|---|
modpython: | Builds the Apache/Python integration module from source. |
root: | Configures an Apache server root (an instance in Zope speak). |
这些配方看起来是可靠的,但是基本上功能集是 由作者的迫切需要决定。别犹豫,发问, <;thomas@thomas-lotze.de>;的错误报告、建议或修补程序。
生成配方:tl.buildout_apache:httpd
下面描述的选项都不是必需的:它们要么是合理的 默认值或由配方计算。你可以覆盖其中任何一个。
配置选项:
url: Where to get the source distribution. md5sum: MD5 checksum of the source distribution. extra-options: Extra configure options, appended to the ^{tt2}$ command line. extra-vars: Extra environment variables for ^{tt2}$, ^{tt4}$, and ^{tt5}$ calls.
导出选项:
httpd-path: Absolute file system path to the ^{tt6}$ executable. envvars-path: Absolute file system path to the ^{tt7}$ script. apxs-path: Absolute file system path to the ^{tt8}$ executable. module-dir: Absolute file system path to the shared modules directory. htdocs: Absolute file system path to the document directory distributed with the Apache server, containing the welcome page. cgi-bin: Absolute file system path to the document cgi-bin distributed with the Apache server, containing test and demo scripts.
注意
已在未设置任何编译器或链接器标志的情况下测试了生成httpd (CFLAGS和LDFLAGS环境变量)。它也一直 注意到httpd不能使用某些链接器标志生成。如果httpd 配方失败,运行make时出现警告,请使用 以上变量未设置。
小心!
如果您计划将python 2.4嵌入apache,例如使用mod_python, 确保您拥有expat库的1.95.8版本及其开发 运行生成配方时系统上安装的文件。否则 apache将使用自己的老版本expat,这可能会导致 由于两个不兼容的expat版本 在同一过程中使用。
这是暂时的谨慎措施,因为Python2.5及更高版本避免了 冲突。因此,配方并没有特意制作 当然是程序化的expat版本。
mod_python配方:tl.buildout_apache:modpython
下面描述的选项都不是必需的:它们要么是合理的 默认值或由配方计算。你可以覆盖其中任何一个。
配置选项:
url: Where to get the source distribution. md5sum: MD5 checksum of the source distribution. extra-options: Extra configure options, appended to the ^{tt2}$ command line. extra-vars: Extra environment variables for ^{tt2}$, ^{tt4}$, and ^{tt5}$ calls.
httpd: The name of a buildout section for an httpd installation, defaults to “httpd”. It must export the “apxs-path” option. python: The name of a buildout section for a Python installation, defaults to the Python section used by the “buildout” part. It must export the “executable” option. virtualenv: Whether to create a virtual Python environment from the Python installation given. Defaults to “true”. The recipe needs to write to its Python’s site packages, so don’t turn this off unless the ^{tt17}$ option describes a writable (probably virtual) Python installation that this part should share.
导出选项:
modpython: Absolute file system path to the ^{tt18}$ shared module. executable: The Python executable that should be used for installing eggs.
服务器根配方:tl.buildout_apache:root
使用此配方配置的apache服务器进程将运行“prefork” 多处理模块。
下面描述的选项都不是必需的:它们要么是合理的 默认值或由配方计算。你可以覆盖其中任何一个。
apache根目录的配置可以跨多个buildout进行拆分 部分,以便进行语义分组、重用等。 称为配置部分,通常只是没有 建立配方的必要性。配置部分递归工作。
仅适用于根部件的配置选项:
httpd: The name of a buildout section for an httpd installation, defaults to “httpd”. It must export the following options:
- httpd-path
- envvars-path
- module-dir
Other options, if present, are used to provide default values for the root part’s own options:
- htdocs
- cgi-bin
ulimit: Command to increase the maximum allowed number of file descriptors per child process. sysconf-dir: Absolute file system path to the system configuration directory, e.g. ^{tt20}$. It is used to find MIME configuration files. lynx-path: Absolute file system path to the ^{tt21}$ executable.
user: User name to run the server as (if starting it as root). group: Group name to run the server as (if starting it as root). listen: Interfaces and ports to listen at, such as 127.0.0.1:80.
python: The name of a buildout section defining a mod_python installation. If not given, mod_python is not used. If present, the named section must export the following options:
- modpython
- executable
virtual-hosts: name=address pairs for configuring name-based virtual hosts. The name selects a config-part describing the host, the address is an IP address with an optional port, e.g. 127.0.0.1:80.
适用于根部件和虚拟主机的配置选项:
servername: Server name to announce, e.g. localhost:80. Mandatory for virtual hosts. serveradmin: E-mail address of the server administrator. htdocs: Absolute file system path to the document root, defaults to the value of the httpd part’s ^{tt22}$ option. cgi-bin: Absolute file system path to the CGI library directory, defaults to the value of the https part’s ^{tt23}$ option. log-dir: File system path to the log directory to be created, either absolute or relative to the server root.
index: See the zc.recipe.egg documentation.
应用于配置部分的配置选项,包括根和 虚拟主机部件:
modules: Names of shared modules to load, e.g. “dir” or “rewrite”. Includes authz_host by default. To specify the shared object path of a module, add an entry of the form “foo=path/to/foo.so”. Paths are either absolute or considered relative to the httpd installation. extra-env: Additional variables to be exported to httpd’s environment. Each line is of the form “^{tt24}$”, e.g. “^{tt25}$”. extra-config: Arbitrary multi-line server configuration.
eggs: Specifications of eggs to be added to the Python module search path available to code run by mod_python. find-links: See the zc.recipe.egg documentation. extra-paths: Non-egg paths to be included in the Python module search path.
config-parts: Names of buildout sections with further configuration. The following options exported from config parts are recognized:
- config-parts (included recursively)
- modules
- extra-env
- extra-config
- eggs
- find-links
- extra-paths
关于tl.buildout_apache
Author: | Thomas Lotze <thomas@thomas-lotze.de> |
---|---|
PyPI page: | http://pypi.python.org/pypi/tl.buildout_apache/ |
Issue tracker: | https://bitbucket.org/tlotze/tl.buildout_apache/issues/ |
Source code: | https://bitbucket.org/tlotze/tl.buildout_apache/src/ |
Current change log: | |
https://bitbucket.org/tlotze/tl.buildout_apache/src/tip/CHANGES.txt |