This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
django_con_apache_y_mod_python [10/07/2008 16:53] fernando |
django_con_apache_y_mod_python [10/07/2008 17:47] fernando |
||
---|---|---|---|
Line 63: | Line 63: | ||
**NOTA:** El artículo [[http://articles.slicehost.com/2007/9/18/apache-virtual-hosts-permissions|Apache Virtual Hosts - permissions]] explica de manera sencilla el tema de configuración de permisos en el contexto de un host virtual de Apache. Aún no entiendo bien por qué el usuario principal (es decir, el dueño de los archivos de Catalis) debería agregarse al grupo //www-data//. | **NOTA:** El artículo [[http://articles.slicehost.com/2007/9/18/apache-virtual-hosts-permissions|Apache Virtual Hosts - permissions]] explica de manera sencilla el tema de configuración de permisos en el contexto de un host virtual de Apache. Aún no entiendo bien por qué el usuario principal (es decir, el dueño de los archivos de Catalis) debería agregarse al grupo //www-data//. | ||
+ | |||
Line 78: | Line 79: | ||
El siguiente ejemplo usa un único host virtual para ocuparse de las tres funciones descriptas más arriba. Fue testeado en Apache 2.2 sobre Ubuntu 8.04 (Hardy). | El siguiente ejemplo usa un único host virtual para ocuparse de las tres funciones descriptas más arriba. Fue testeado en Apache 2.2 sobre Ubuntu 8.04 (Hardy). | ||
- | **NOTA 1:** debe reemplazarse **''<nowiki>{{/path/to/catalis}}</nowiki>''** por el path que corresponda. | + | **NOTA 1:** debe reemplazarse **''/PATH/TO/CATALIS''** por el path que corresponda. |
**NOTA 2:** El uso del puerto 81 es sólo a modo de ejemplo. Si se opta por usar un puerto alternativo para el virtual host, posiblemente la directiva ''Listen'' deba moverse al archivo de configuración ''ports.conf''. | **NOTA 2:** El uso del puerto 81 es sólo a modo de ejemplo. Si se opta por usar un puerto alternativo para el virtual host, posiblemente la directiva ''Listen'' deba moverse al archivo de configuración ''ports.conf''. | ||
Line 120: | Line 121: | ||
# Add the directory where the settings live | # Add the directory where the settings live | ||
- | PythonPath "['{{/path/to/catalis}}/django_files'] + sys.path" | + | PythonPath "['/PATH/TO/CATALIS/django_files'] + sys.path" |
</Location> | </Location> | ||
Line 129: | Line 130: | ||
# Turn off mod_python for serving static files (css, js, images, xml, ...). | # Turn off mod_python for serving static files (css, js, images, xml, ...). | ||
# Note: in a virtual host we could use instead an appropriate value for DocumentRoot. | # Note: in a virtual host we could use instead an appropriate value for DocumentRoot. | ||
- | Alias /catalis/media/ "{{/path/to/catalis}}/static_files/" | + | Alias /catalis/media/ "/PATH/TO/CATALIS/static_files/" |
<Location "/catalis/media/"> | <Location "/catalis/media/"> | ||
SetHandler None | SetHandler None | ||
</Location> | </Location> | ||
- | <Directory "{{/path/to/catalis}}/static_files/"> | + | <Directory "/PATH/TO/CATALIS/static_files/"> |
Order Allow,Deny | Order Allow,Deny | ||
Allow from all | Allow from all | ||
Line 144: | Line 145: | ||
# ------------------------------------------------------ | # ------------------------------------------------------ | ||
# We want to run wxis using '/catalis/cgi-bin/wxis' | # We want to run wxis using '/catalis/cgi-bin/wxis' | ||
- | ScriptAlias /catalis/cgi-bin/ "{{/path/to/catalis}}/cgi-bin/" | + | ScriptAlias /catalis/cgi-bin/ "/PATH/TO/CATALIS/cgi-bin/" |
# Turn off mod_python here too | # Turn off mod_python here too | ||
<Location "/catalis/cgi-bin/"> | <Location "/catalis/cgi-bin/"> | ||
Line 150: | Line 151: | ||
</Location> | </Location> | ||
# Restrict access only to clients running on the same machine. | # Restrict access only to clients running on the same machine. | ||
- | <Directory "{{/path/to/catalis}}/cgi-bin/"> | + | <Directory "/PATH/TO/CATALIS/cgi-bin/"> |
Order Deny,Allow | Order Deny,Allow | ||
Deny from all | Deny from all | ||
Line 164: | Line 165: | ||
**TO-DO:** agregar algo aquí, p.ej. verificar que no se pueda acceder a wxis desde afuera, pero sí en forma local. | **TO-DO:** agregar algo aquí, p.ej. verificar que no se pueda acceder a wxis desde afuera, pero sí en forma local. | ||
+ | |||
Line 172: | Line 174: | ||
(En construcción!) | (En construcción!) | ||
- | * Python | + | * Python 2.5 |
- | * Django | + | * Django 0.96 |
- | * [[http://httpd.apache.org/download.cgi|Apache 2.2]] (versión: ''apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi'') | + | * [[http://httpd.apache.org/download.cgi|Apache 2.2]] (versión: ''apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi''). Instalacion tipica, como servicio. |
* [[http://httpd.apache.org/modules/python-download.cgi|mod_python]] (versión: ''mod_python-3.3.1.win32-py2.5-Apache2.2.exe'') | * [[http://httpd.apache.org/modules/python-download.cgi|mod_python]] (versión: ''mod_python-3.3.1.win32-py2.5-Apache2.2.exe'') | ||
* instalar (ejecutar el ''.exe''); cuando pregunta por la carpeta de Apache, indicar la carpeta ''Apache2.2''. | * instalar (ejecutar el ''.exe''); cuando pregunta por la carpeta de Apache, indicar la carpeta ''Apache2.2''. | ||
- | * agregar línea en httpd.conf: ''LoadModule python_module modules/mod_python.so'' | + | * agregar línea en ''httpd.conf'': |
+ | |||
+ | <code apache> | ||
+ | LoadModule python_module modules/mod_python.so'' | ||
+ | </code> | ||
+ | |||
+ | * Configuracion de Apache: copiar la config. sugerida en ''conf/extra/catalis.conf''; agregar esta linea al final de ''conf/httpd.conf'': | ||
+ | |||
+ | <code apache> | ||
+ | Include conf/extra/catalis.conf | ||
+ | </code> |