Sie befinden sich hier: eisfair / Pack-Eis
News News News

Navigation

Content

Dateianzeige für apache2-mod_python (3.4.0)

usr/share/doc/apache2-mod_python/apache2-mod_python.txt
Apache2 Mod Python - package for eisfair ======================================== ACHTUNG: Es ist nicht moeglich 'apache2-mod_python' und 'apache2-mod_wsgi' zusammen zu benutzen. Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals. A more detailed description of what mod_python can do is available in this O'Reilly article. http://www.onlamp.com/pub/a/python/2003/10/02/mod_python.html What is Mod_python? Mod_python is actually several things: * a loadable Apache module which embeds the Python interpreter (libpython), thereby providing the ability to execute Python code in-process by Apache. * a handler of Apache's request processing phases, allowing for any phase of the request to be implemented in Python. It also allows filters and connection handlers to be implemented in Python. * an interface to a subset of the Apache API, allowing the ability to call internal Apache functions from Python. This provides access to internal server information and ability to take advantage of Apache server facilities such as logging. * a collection of tools for developing web applications. It provides a set of standard handlers: Publisher, PSP, and CGI each providing an alternative development framework, as well as a set of utility objects and functions for cookie processing, session management, and other things common in web development. Mod Python ist als Modul im Apache2 Menu zu finden Apache2 Webserver Configuration Modules configuration Apache2 Mod Python 1 View documentation 2 Edit configuration Die Konfiguration START_APACHE2_MOD_PYTHON Fuer die Aktivierung des APACHE2_MOD_PYTHON muss diese Variable lediglich auf den Wert 'yes' gestellt werden. Die Einstellung 'no' schaltet APACHE2_MOD_PYTHON ab. Gueltige Werte: yes, no Standardeinstellung: START_APACHE2_MOD_PYTHON='no' APACHE2_MOD_PYTHON_PYTHON Hier wird die Python Version enigestellt fuer die das Modul geladen werden soll. Gueltige Werte: 2, 38, 310 Standardeinstellung: APACHE2_MOD_PYTHON_PYTHON='2' Handling fuer Abhaengige Pakete Fuer Pakete die Eintraege in die Apache configuration vornehmen und von dem Modul mod_python abhaengig sind, muss ein start/stop Script angelegt werden, in dem aufgefuehrt ist, was bei start und stop ausgefuehrt werden soll. Aufgerufen wird das Script mit start oder stop als Parameter die Syntax fuer das Namensformat mod_python.$packages_name in /var/lib/apache2-mod_python/ Die Datei muss ausfuehrbar sein chmod 0750 Nachstehend ein Beispiel wie so etwas aussehen koennte. Hier nun auf die Datei /var/install/config.d/$packages bezogen [...] #-------------------------------------------------------------------------- # create mod_python file #-------------------------------------------------------------------------- create_mod_python_file() { mod_python_file=/var/lib/apache2-mod_python/mod_python.${package_name} # convert packages_name to PACKAGES_NAME packages_name_upper=`echo ${packages_name} | tr [:lower:] [:upper:]` if [ ! -f ${mod_python_file} ] then cat >${mod_python_file} <