comparison es/collab.tex @ 537:22391f67dc26

Translated lighttpd and started web options
author Igor TAmara <igor@tamarapatino.org>
date Sat, 06 Dec 2008 00:14:38 -0500
parents 0d6c97362064
children aeda195f54a6
comparison
equal deleted inserted replaced
536:05bfbe50e7e4 537:22391f67dc26
785 completa al repositorio que desea servir. 785 completa al repositorio que desea servir.
786 786
787 En este punto, cuando trate de recargar la página, deberá visualizar 787 En este punto, cuando trate de recargar la página, deberá visualizar
788 una linda vista HTML de la historia de su repositorio. Uff! 788 una linda vista HTML de la historia de su repositorio. Uff!
789 789
790 \subsubsection{Configuring lighttpd} 790 \subsubsection{Configuración de lighttpd}
791 791
792 To be exhaustive in my experiments, I tried configuring the 792 En mi intención de ser exhaustivo, intenté configurar
793 increasingly popular \texttt{lighttpd} web server to serve the same 793 \texttt{lighttpd}, un servidor web con creciente aceptación, para
794 repository as I described with Apache above. I had already overcome 794 servir los repositorios de la misma forma como lo describí
795 all of the problems I outlined with Apache, many of which are not 795 anteriormente con Apache. Después de superar los problemas que mostré
796 server-specific. As a result, I was fairly sure that my file and 796 con Apache, muchos de los cuáles no son específicos del servidor. Por
797 directory permissions were good, and that my \sfilename{hgweb.cgi} 797 lo tanto estaba seguro de que mis permisos para directorios y ficheros
798 script was properly edited. 798 eran correctos y que mi guión \sfilename{hgweb.cgi} también lo era.
799 799
800 Once I had Apache running, getting \texttt{lighttpd} to serve the 800 Dado que ya Apache estaba en ejecución correctamente, lograr que
801 repository was a snap (in other words, even if you're trying to use 801 \texttt{lighttpd} sirviera mi repositorio fue rápido(en otras
802 \texttt{lighttpd}, you should read the Apache section). I first had 802 palabras, si está tratando de usar \texttt{lighttpd}, debe leer la
803 to edit the \texttt{mod\_access} section of its config file to enable 803 sección de Apache). Primero tuve que editar la sección
804 \texttt{mod\_cgi} and \texttt{mod\_userdir}, both of which were 804 \texttt{mod\_access} para habilitar \texttt{mod\_cgi} y
805 disabled by default on my system. I then added a few lines to the end 805 \texttt{mod\_userdir}, los cuales estaban inhabilitados en mi
806 of the config file, to configure these modules. 806 instalación predeterminada. Añadí posteriormente unas líneas al final
807 del fichero de configuración, para hacer lo propio con los módulos.
807 \begin{codesample2} 808 \begin{codesample2}
808 userdir.path = "public_html" 809 userdir.path = "public_html"
809 cgi.assign = ( ".cgi" => "" ) 810 cgi.assign = ( ".cgi" => "" )
810 \end{codesample2} 811 \end{codesample2}
811 With this done, \texttt{lighttpd} ran immediately for me. If I had 812 Hecho esto, \texttt{lighttpd} funcionó inmediatamente para
812 configured \texttt{lighttpd} before Apache, I'd almost certainly have 813 mí. Configuré \texttt{lighttpd} antes que Apache, tuve casi los mismos
813 run into many of the same system-level configuration problems as I did 814 reparos a nivel de configuración del sistema que con Apache. De todas
814 with Apache. However, I found \texttt{lighttpd} to be noticeably 815 maneras, considero que \texttt{lighttpd} es bastante más sencillo de
815 easier to configure than Apache, even though I've used Apache for over 816 configurar que Apache, a pesar de haber usado Apache por lo menos por
816 a decade, and this was my first exposure to \texttt{lighttpd}. 817 una década, y esta fue mi primera experiencia con \texttt{lighttpd}.
817 818
818 \subsection{Sharing multiple repositories with one CGI script} 819 \subsection{Compartir varios repositorios con un script CGI}
819 820
820 The \sfilename{hgweb.cgi} script only lets you publish a single 821 El guión \sfilename{hgweb.cgi} permite publicar únicamente un
821 repository, which is an annoying restriction. If you want to publish 822 repositorio, una restricción frustrante. Si desea publicar más de uno
822 more than one without wracking yourself with multiple copies of the 823 sin complicarse con varias copias del mismo guión, cada una con un
823 same script, each with different names, a better choice is to use the 824 nombre distinto, resulta mucho mejor usar el guión
824 \sfilename{hgwebdir.cgi} script. 825 \sfilename{hgwebdir.cgi}.
825 826
826 The procedure to configure \sfilename{hgwebdir.cgi} is only a little 827 El procedimiento para configurar \sfilename{hgwebdir.cgi} tiene una
827 more involved than for \sfilename{hgweb.cgi}. First, you must obtain 828 porción adicional frente al trabajo requerido con
828 a copy of the script. If you don't have one handy, you can download a 829 \sfilename{hgweb.cgi}. Primero se debe obtener una copia del
829 copy from the master Mercurial repository at 830 guión. Si no tiene una a mano, puede descargar una copia del ftp
831 principal del repositorio de Mercurial en
830 \url{http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi}. 832 \url{http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi}.
831 833
832 You'll need to copy this script into your \dirname{public\_html} 834 Necesitará una copia del guión en su directorio \dirname{public\_html},
833 directory, and ensure that it's executable. 835 y asegurarse de que sea ejecutable.
834 \begin{codesample2} 836 \begin{codesample2}
835 cp .../hgwebdir.cgi ~/public_html 837 cp .../hgwebdir.cgi ~/public_html
836 chmod 755 ~/public_html ~/public_html/hgwebdir.cgi 838 chmod 755 ~/public_html ~/public_html/hgwebdir.cgi
837 \end{codesample2} 839 \end{codesample2}
838 With basic configuration out of the way, try to visit 840 Con la configuración básica, intente visitar en su navegador
839 \url{http://myhostname/~myuser/hgwebdir.cgi} in your browser. It 841 \url{http://myhostname/~myuser/hgwebdir.cgi}. Debería mostar una
840 should display an empty list of repositories. If you get a blank 842 lista vacía de repositorios. Si obtiene una ventana en blanco o un
841 window or error message, try walking through the list of potential 843 mensaje de error, verifique la lista de problemas potenciales en la
842 problems in section~\ref{sec:collab:wtf}. 844 sección~\ref{sec:collab:wtf}.
843 845
844 The \sfilename{hgwebdir.cgi} script relies on an external 846 El guión \sfilename{hgwebdir.cgi} se apoya en un fichero externo de
845 configuration file. By default, it searches for a file named 847 configuración. En principio, busca un fichero llamado
846 \sfilename{hgweb.config} in the same directory as itself. You'll need 848 \sfilename{hgweb.config} en el mismo directorio. Tendrá que crear el
847 to create this file, and make it world-readable. The format of the 849 fichero, y permitir lectura de todo el mundo. El formato del fichero
848 file is similar to a Windows ``ini'' file, as understood by Python's 850 es similar a un fichero ``ini'' de Windows, que puede interpretar el módulo
849 \texttt{ConfigParser}~\cite{web:configparser} module. 851 \texttt{ConfigParser}~\cite{web:configparser} de Python.
850 852
851 The easiest way to configure \sfilename{hgwebdir.cgi} is with a 853 La forma más sencilla de configurar \sfilename{hgwebdir.cgi} es con
852 section named \texttt{collections}. This will automatically publish 854 una sección llamada \texttt{collections}. Esta publicará automáticamente
853 \emph{every} repository under the directories you name. The section 855 \emph{todos} los repositorios en los directorios que usted
854 should look like this: 856 especifique. La sección debería lucir así:
855 \begin{codesample2} 857 \begin{codesample2}
856 [collections] 858 [collections]
857 /my/root = /my/root 859 /mi/ruta = /mi/ruta
858 \end{codesample2} 860 \end{codesample2}
859 Mercurial interprets this by looking at the directory name on the 861 Mercurial lo interpreta buscando el nombre del directorio que esté a la
860 \emph{right} hand side of the ``\texttt{=}'' sign; finding 862 \emph{derecha} del símbolo ``\texttt{=}''; encontrando repositorios en
861 repositories in that directory hierarchy; and using the text on the 863 la jerarquía de directorios; y usando el texto a la \emph{izquierda}
862 \emph{left} to strip off matching text from the names it will actually 864 para eliminar el texto de los nombres que mostrará en la interfaz
863 list in the web interface. The remaining component of a path after 865 web. El componente restante de la ruta después de esta eliminación
864 this stripping has occurred is called a ``virtual path''. 866 usualmente se llama ``ruta virtual''.
865 867
866 Given the example above, if we have a repository whose local path is 868 Dado el ejemplo de arriba, si tenemos un repositorio cuya ruta local es
867 \dirname{/my/root/this/repo}, the CGI script will strip the leading 869 \dirname{/mi/ruta/este/repo}, el guión CGI eliminará la porción inicial
868 \dirname{/my/root} from the name, and publish the repository with a 870 \dirname{/mi/ruta} del nombre y publicará el repositorio con una ruta
869 virtual path of \dirname{this/repo}. If the base URL for our CGI 871 virtual \dirname{este/repo}. Si el URL base de nuestro guión CGI es
870 script is \url{http://myhostname/~myuser/hgwebdir.cgi}, the complete 872 \url{http://myhostname/~myuser/hgwebdir.cgi}, el URL completo al
871 URL for that repository will be 873 repositorio será
872 \url{http://myhostname/~myuser/hgwebdir.cgi/this/repo}. 874 \url{http://myhostname/~myuser/hgwebdir.cgi/this/repo}.
873 875
874 If we replace \dirname{/my/root} on the left hand side of this example 876 Si reemplazamos \dirname{/mi/ruta} en el lado izquierdo de este
875 with \dirname{/my}, then \sfilename{hgwebdir.cgi} will only strip off 877 ejemplo con \dirname{/mi}, \sfilename{hgwebdir.cgi} eliminará solamente
876 \dirname{/my} from the repository name, and will give us a virtual 878 \dirname{/mi} del nombre del repositorio, y nos ofrecerá la ruta
877 path of \dirname{root/this/repo} instead of \dirname{this/repo}. 879 virtual \dirname{ruta/este/repo} en lugar de \dirname{este/repo}.
878 880
879 The \sfilename{hgwebdir.cgi} script will recursively search each 881 El guión \sfilename{hgwebdir.cgi} buscará recursivamente en cada
880 directory listed in the \texttt{collections} section of its 882 directorio listado en la sección \texttt{collections} de su archivo de
881 configuration file, but it will \texttt{not} recurse into the 883 configuración, pero \texttt{no} hará el recorrido recursivo dentro de
882 repositories it finds. 884 los repositorios que encuentre.
883 885
884 The \texttt{collections} mechanism makes it easy to publish many 886 El mecanismo de \texttt{collections} permite publicar fácilmente
885 repositories in a ``fire and forget'' manner. You only need to set up 887 repositorios de una forma ``hacer y olvidar''. Solamente requiere
886 the CGI script and configuration file one time. Afterwards, you can 888 configurar el guión CGI y el archivo de configuración una vez.
887 publish or unpublish a repository at any time by simply moving it 889 Después de eso puede publicar y sacar de publicación un repositorio en
888 into, or out of, the directory hierarchy in which you've configured 890 cualquier momento incluyéndolo o excluyéndolo de la jerarquía de
889 \sfilename{hgwebdir.cgi} to look. 891 directorios en la cual le haya indicado a \sfilename{hgwebdir.cgi} que
890 892 mirase.
891 \subsubsection{Explicitly specifying which repositories to publish} 893
892 894 \subsubsection{Especificación explícita de los repositorios a publicar}
893 In addition to the \texttt{collections} mechanism, the 895
894 \sfilename{hgwebdir.cgi} script allows you to publish a specific list 896 Además del mecanismo \texttt{collections}, el guión
895 of repositories. To do so, create a \texttt{paths} section, with 897 \sfilename{hgwebdir.cgi} le permite publicar una lista específica de
896 contents of the following form. 898 repositorios. Para hacerlo, cree una sección \texttt{paths}, con los
899 contenidos de la siguiente forma:
897 \begin{codesample2} 900 \begin{codesample2}
898 [paths] 901 [paths]
899 repo1 = /my/path/to/some/repo 902 repo1 = /mi/ruta/a/un/repo
900 repo2 = /some/path/to/another 903 repo2 = /ruta/a/otro/repo
901 \end{codesample2} 904 \end{codesample2}
902 In this case, the virtual path (the component that will appear in a 905 En este caso, la ruta virtual (el componente que aparecerá en el URL)
903 URL) is on the left hand side of each definition, while the path to 906 está en el lado derecho de cada definición, mientras que la ruta al
904 the repository is on the right. Notice that there does not need to be 907 repositorio está a la derecha. Note que no tiene que haber relación
905 any relationship between the virtual path you choose and the location 908 alguna entre la ruta virtual que elija y el lugar del repositorio en
906 of a repository in your filesystem. 909 su sistema de archivos.
907 910
908 If you wish, you can use both the \texttt{collections} and 911 Si lo desea, puede usar los dos mecanismos \texttt{collections} y
909 \texttt{paths} mechanisms simultaneously in a single configuration 912 \texttt{paths} simultáneamente en un sólo archivo de configuración.
910 file.
911 913
912 \begin{note} 914 \begin{note}
913 If multiple repositories have the same virtual path, 915 Si varios repositorios tienen la misma ruta virtual,
914 \sfilename{hgwebdir.cgi} will not report an error. Instead, it will 916 \sfilename{hgwebdir.cgi} no reportará error. Pero se comportará
915 behave unpredictably. 917 impredeciblemente.
916 \end{note} 918 \end{note}
917 919
918 \subsection{Downloading source archives} 920 \subsection{Descarga de ficheros fuente}
919 921
920 Mercurial's web interface lets users download an archive of any 922 La interfaz web de Mercurial permite a los ususarios descargar
921 revision. This archive will contain a snapshot of the working 923 un conjunto de cualquier revisión. Este fichero contendrá una réplica
922 directory as of that revision, but it will not contain a copy of the 924 del directorio de trabajo en la revisión en cuestión, pero no
923 repository data. 925 contendrá una copia de los datos del repositorio.
924 926
925 By default, this feature is not enabled. To enable it, you'll need to 927 De forma predeterminada esta característica no está habilitada. Para
926 add an \rcitem{web}{allow\_archive} item to the \rcsection{web} 928 lograrlo adicione un \rcitem{web}{allow\_archive} a la sección \rcsection{web}
927 section of your \hgrc. 929 de su fichero \hgrc.
928 930
929 \subsection{Web configuration options} 931 \subsection{Opciones de configuración en Web}
930 932
931 Mercurial's web interfaces (the \hgcmd{serve} command, and the 933 Las interfaces web de Mercurial(la orden \hgcmd{serve}, y los guiones
932 \sfilename{hgweb.cgi} and \sfilename{hgwebdir.cgi} scripts) have a 934 \sfilename{hgweb.cgi} y \sfilename{hgwebdir.cgi}) tienen varias
933 number of configuration options that you can set. These belong in a 935 opciones de configuración para establecer. Todas ellas en la sección
934 section named \rcsection{web}. 936 \rcsection{web}.
935 \begin{itemize} 937 \begin{itemize}
936 \item[\rcitem{web}{allow\_archive}] Determines which (if any) archive 938 \item[\rcitem{web}{allow\_archive}] Determina cuáles tipos de archivos
937 download mechanisms Mercurial supports. If you enable this 939 de descarga soportará Mercurial. Si habilita esta característica,
938 feature, users of the web interface will be able to download an 940 los usuarios de la interfaz web podrán descargar una copia de la
939 archive of whatever revision of a repository they are viewing. 941 revisión del repositorio que estén viendo. Para activar la
940 To enable the archive feature, this item must take the form of a 942 característica de descarga de fichero, el valor tendrá una secuencia
941 sequence of words drawn from the list below. 943 de palabras extraídas de la lista de abajo.
942 \begin{itemize} 944 \begin{itemize}
943 \item[\texttt{bz2}] A \command{tar} archive, compressed using 945 \item[\texttt{bz2}] Un fichero \command{tar} con el método de
944 \texttt{bzip2} compression. This has the best compression ratio, 946 compresión \texttt{bzip2}. Tiene la mejor taza de compresión,
945 but uses the most CPU time on the server. 947 pero usa más tiempo de procesamiento en el servidor.
946 \item[\texttt{gz}] A \command{tar} archive, compressed using 948 \item[\texttt{gz}] Un fichero \command{tar}, comprimido con
947 \texttt{gzip} compression. 949 \texttt{gzip}.
948 \item[\texttt{zip}] A \command{zip} archive, compressed using LZW 950 \item[\texttt{zip}] Un fichero \command{zip}, comprimido con LZW.
949 compression. This format has the worst compression ratio, but is 951 Este formato posee la peor tasa de compresió, pero es muy usado en
950 widely used in the Windows world. 952 el mundo Windows.
951 \end{itemize} 953 \end{itemize}
952 If you provide an empty list, or don't have an 954 Si da una lista vacía o no tiene la entrada
953 \rcitem{web}{allow\_archive} entry at all, this feature will be 955 \rcitem{web}{allow\_archive}, esta característica se deshabilitará.
954 disabled. Here is an example of how to enable all three supported 956 A continuación un ejemplo de cómo habilitar los tres formatos soportados.
955 formats.
956 \begin{codesample4} 957 \begin{codesample4}
957 [web] 958 [web]
958 allow_archive = bz2 gz zip 959 allow_archive = bz2 gz zip
959 \end{codesample4} 960 \end{codesample4}
960 \item[\rcitem{web}{allowpull}] Boolean. Determines whether the web 961 \item[\rcitem{web}{allowpull}] Booleano. Determina si la interfaz web
961 interface allows remote users to \hgcmd{pull} and \hgcmd{clone} this 962 permite a los usuarios remotos emplear \hgcmd{pull} y \hgcmd{clone}
962 repository over~HTTP. If set to \texttt{no} or \texttt{false}, only 963 sobre el repositorio~HTTP. Si se coloca \texttt{no} o
963 the ``human-oriented'' portion of the web interface is available. 964 \texttt{false}, solamente la porción de los procesos
965 ``human-oriented'' se habilita de la interfaz web.
964 \item[\rcitem{web}{contact}] String. A free-form (but preferably 966 \item[\rcitem{web}{contact}] String. A free-form (but preferably
965 brief) string identifying the person or group in charge of the 967 brief) string identifying the person or group in charge of the
966 repository. This often contains the name and email address of a 968 repository. This often contains the name and email address of a
967 person or mailing list. It often makes sense to place this entry in 969 person or mailing list. It often makes sense to place this entry in
968 a repository's own \sfilename{.hg/hgrc} file, but it can make sense 970 a repository's own \sfilename{.hg/hgrc} file, but it can make sense