hgbook

changeset 436:0d6c97362064

translated cgi configuration
author Igor TAmara <igor@tamarapatino.org>
date Thu Dec 04 00:30:24 2008 -0500 (2008-12-04)
parents 263a8436d72d
children 05bfbe50e7e4
files es/Leame.1st es/collab.tex
line diff
     1.1 --- a/es/Leame.1st	Mon Dec 01 21:53:26 2008 -0500
     1.2 +++ b/es/Leame.1st	Thu Dec 04 00:30:24 2008 -0500
     1.3 @@ -103,7 +103,7 @@
     1.4  || tour-merge.tex  || Javier Rojas  ||    100%    || 28/10/2008 ||  03/11/2008 ||
     1.5  || concepts.tex    || Javier Rojas  ||    100%    || 03/11/2008 ||  23/11/2008 ||
     1.6  || intro.tex	   || Igor Támara   ||	  100%	  || 08/11/2008	||  09/11/2008 ||
     1.7 -|| collab.tex      || Igor Támara   ||     65%    || 10/11/2008 ||             ||
     1.8 +|| collab.tex      || Igor Támara   ||     73%    || 10/11/2008 ||             ||
     1.9  || filenames.tex   || Javier Rojas  ||     72%    || 27/11/2008 ||             ||
    1.10  || hook.tex        || Javier Rojas  ||      8%    || 01/12/2008 ||             ||
    1.11  
     2.1 --- a/es/collab.tex	Mon Dec 01 21:53:26 2008 -0500
     2.2 +++ b/es/collab.tex	Thu Dec 04 00:30:24 2008 -0500
     2.3 @@ -694,47 +694,52 @@
     2.4    chmod 755 ~/public_html
     2.5  \end{codesample2}
     2.6  
     2.7 -\subsubsection{What could \emph{possibly} go wrong?}
     2.8 +\subsubsection{¿Qué \emph{podría} resultar mal?}
     2.9  \label{sec:collab:wtf}
    2.10  
    2.11 -Once you've copied the CGI script into place, go into a web browser,
    2.12 -and try to open the URL \url{http://myhostname/~myuser/hgweb.cgi},
    2.13 -\emph{but} brace yourself for instant failure.  There's a high
    2.14 -probability that trying to visit this URL will fail, and there are
    2.15 -many possible reasons for this.  In fact, you're likely to stumble
    2.16 -over almost every one of the possible errors below, so please read
    2.17 -carefully.  The following are all of the problems I ran into on a
    2.18 -system running Fedora~7, with a fresh installation of Apache, and a
    2.19 -user account that I created specially to perform this exercise.
    2.20 -
    2.21 -Your web server may have per-user directories disabled.  If you're
    2.22 -using Apache, search your config file for a \texttt{UserDir}
    2.23 -directive.  If there's none present, per-user directories will be
    2.24 -disabled.  If one exists, but its value is \texttt{disabled}, then
    2.25 -per-user directories will be disabled.  Otherwise, the string after
    2.26 -\texttt{UserDir} gives the name of the subdirectory that Apache will
    2.27 -look in under your home directory, for example \dirname{public\_html}.
    2.28 -
    2.29 -Your file access permissions may be too restrictive.  The web server
    2.30 -must be able to traverse your home directory and directories under
    2.31 -your \dirname{public\_html} directory, and read files under the latter
    2.32 -too.  Here's a quick recipe to help you to make your permissions more
    2.33 -appropriate.
    2.34 +Cuando haya ubicado el CGI en el sitio correspondiente con un navegador
    2.35 +intente visitar el URL \url{http://myhostname/~myuser/hgweb.cgi},
    2.36 +\emph{sin} dejarse abatir por un error.  Hay una alta probabilidad de
    2.37 +que esta primera visita al URL sea fallida, y hay muchas razones posibles
    2.38 +para este comportamiento.  De hecho, podría toparse con cada uno de los
    2.39 +errores que describimos a continuación, así que no deje de leerlos
    2.40 +cuidadosamente.   A continuación presento los problemas que yo tuve en
    2.41 +un sistema con Fedora~7, con una instalación nueva de Apache, y una
    2.42 +cuenta de usuario que creé específicamente para desarrollar este
    2.43 +ejercicio.
    2.44 +
    2.45 +Su servidor web puede tener directorios por usuario deshabilitados. Si
    2.46 +usa Apache, busque el fichero de configuración que contenga la
    2.47 +directiva \texttt{UserDir}.  Si no está presente en sitio alguno, los
    2.48 +directorios por usuario están deshabilitados.  Si la hay, pero su
    2.49 +valor es \texttt{disabled}, los directorios por usuario estarán
    2.50 +deshabilitados. La directiva \texttt{UserDir} en caso contrario tendrá
    2.51 +el nombre del subdirectorio bajo el cual Apache mirará en el
    2.52 +directorio de cada usuario, por ejemplo \dirname{public\_html}.
    2.53 +
    2.54 +Los permisos de sus ficheros pueden ser demasiado restrictivos.  El
    2.55 +servidor web debe poder recorrer su directorio personal y los
    2.56 +directorios que estén bajo \dirname{public\_html}, además de tener
    2.57 +permiso para leer aquellos que estén adentro.  A continúación una
    2.58 +receta rápida para hacer que sus permisos estén acordes con las
    2.59 +necesidades básicas.
    2.60  \begin{codesample2}
    2.61    chmod 755 ~
    2.62    find ~/public_html -type d -print0 | xargs -0r chmod 755
    2.63    find ~/public_html -type f -print0 | xargs -0r chmod 644
    2.64  \end{codesample2}
    2.65  
    2.66 -The other possibility with permissions is that you might get a
    2.67 -completely empty window when you try to load the script.  In this
    2.68 -case, it's likely that your access permissions are \emph{too
    2.69 -  permissive}.  Apache's \texttt{suexec} subsystem won't execute a
    2.70 -script that's group-~or world-writable, for example.
    2.71 -
    2.72 -Your web server may be configured to disallow execution of CGI
    2.73 -programs in your per-user web directory.  Here's Apache's
    2.74 -default per-user configuration from my Fedora system.
    2.75 +Otra posibilidad con los permisos es que obtenga una ventana
    2.76 +completamente en blanco cuando trata de cargar el script. En cuyo
    2.77 +caso, es posible que los permisos que tiene son \emph{demasiado
    2.78 + permisivos}.  El subsistema \texttt{suexec} de Apache no ejecutará un
    2.79 +script que tenga permisos de escritura para el group o el planeta, por
    2.80 +ejemplo.
    2.81 +
    2.82 +Su servidor web puede estar configurado para evitar la ejecución de
    2.83 +programas CGI en los directorios de usuario.  A continuación presento
    2.84 +una configuración predeterminada por usuario en mi sistema Fedora.
    2.85 +
    2.86  \begin{codesample2}
    2.87    <Directory /home/*/public_html>
    2.88        AllowOverride FileInfo AuthConfig Limit
    2.89 @@ -749,38 +754,38 @@
    2.90        </LimitExcept>
    2.91    </Directory>
    2.92  \end{codesample2}
    2.93 -If you find a similar-looking \texttt{Directory} group in your Apache
    2.94 -configuration, the directive to look at inside it is \texttt{Options}.
    2.95 -Add \texttt{ExecCGI} to the end of this list if it's missing, and
    2.96 -restart the web server.
    2.97 -
    2.98 -If you find that Apache serves you the text of the CGI script instead
    2.99 -of executing it, you may need to either uncomment (if already present)
   2.100 -or add a directive like this.
   2.101 +Si encuentra un grupo de instrucciones de \texttt{Directory} similares
   2.102 +en su configuración de Apache,  la directiva a revisar es \texttt{Options}.
   2.103 +Adicione \texttt{ExecCGI} al final de esta lista en caso de que haga
   2.104 +falta y reinicie su servidor web.
   2.105 +
   2.106 +Si resulta que Apache le muestra el texto del script CGI en lugar de
   2.107 +ejecutarlo, necesitará o bien descomentar(si se encuentra presente) o
   2.108 +adicionar una directiva como la siguiente:
   2.109  \begin{codesample2}
   2.110    AddHandler cgi-script .cgi
   2.111  \end{codesample2}
   2.112  
   2.113 -The next possibility is that you might be served with a colourful
   2.114 -Python backtrace claiming that it can't import a
   2.115 -\texttt{mercurial}-related module.  This is actually progress!  The
   2.116 -server is now capable of executing your CGI script.  This error is
   2.117 -only likely to occur if you're running a private installation of
   2.118 -Mercurial, instead of a system-wide version.  Remember that the web
   2.119 -server runs the CGI program without any of the environment variables
   2.120 -that you take for granted in an interactive session.  If this error
   2.121 -happens to you, edit your copy of \sfilename{hgweb.cgi} and follow the
   2.122 -directions inside it to correctly set your \envar{PYTHONPATH}
   2.123 -environment variable.
   2.124 -
   2.125 -Finally, you are \emph{certain} to by served with another colourful
   2.126 -Python backtrace: this one will complain that it can't find
   2.127 -\dirname{/path/to/repository}.  Edit your \sfilename{hgweb.cgi} script
   2.128 -and replace the \dirname{/path/to/repository} string with the complete
   2.129 -path to the repository you want to serve up.
   2.130 -
   2.131 -At this point, when you try to reload the page, you should be
   2.132 -presented with a nice HTML view of your repository's history.  Whew!
   2.133 +Otra posibilidad es que observe una traza de Python en colores
   2.134 +informando que no puede importar un módulo relacionado con
   2.135 +\texttt{mercurial}.  Esto es un gran progreso!  El servidor es capaz
   2.136 +de ejecutar su script CGI.  Este error solamente ocurrirá si está
   2.137 +ejecutando una instalación privada de Mercurial en lugar de una
   2.138 +instalación para todo el sistema.  Recuerde que el servidor que
   2.139 +ejecuta el programa CGI no cuenta con variables de ambiente de las
   2.140 +cuales usted si dispone en una sesión interactiva.  Si este error le
   2.141 +ocurre, edite su copia de \sfilename{hgweb.cgi} y siga las indicaciones
   2.142 +dentro del mismo para establecer de forma adecuada su variable de
   2.143 +ambiente \envar{PYTHONPATH}.
   2.144 +
   2.145 +Finalmente, si encuentra \emph{otra} traza a todo color de Python al visitar
   2.146 +el URL: Esta seguramente se referirá a que no puede encontrar
   2.147 +\dirname{/path/to/repository}.  Edite su script \sfilename{hgweb.cgi}
   2.148 +y reemplaze la cadena \dirname{/path/to/repository} con la ruta
   2.149 +completa al repositorio que desea servir.
   2.150 +
   2.151 +En este punto, cuando trate de recargar la página, deberá visualizar
   2.152 +una linda vista HTML de la historia de su repositorio. Uff!
   2.153  
   2.154  \subsubsection{Configuring lighttpd}
   2.155