last update: 19 Mar 1999

[home] [index] [contents] [previous] [next]

apache



4.1 DownLoad
http://www.apache.org/dist/apache_1.3.3.tar.gz

4.2 Install

    4.2.1 Directorios utilizados para la instalación

    Antes de la instalación, hay que seleccionar los directorios donde instalar apache, documentos HTML, archivos log.


    4.2.2 Instalación

    Para instalar apache, debemos ubicarnos primero en un directorio temporal de trabajo, puede ser en /tmp, luego procedemos a desempaquetar el software, a continuación nos ubicamos en el directorio apache_1.3.3 creado automáticamente en el momento de desempaquetar.
      % cd $Work
      % gzip -cd apache-1.3.3.tgz | tar xvf -
      % cd apache_1.3.3

    Finalmente damos las siguientes instrucciones:
      % configure --prefix=/usr/local/apache
      % make
      % make install

4.3 Configuración
"Antes de iniciar apache, debemos configurar los siguientes archivos: httpd.conf, access.conf, srm.conf; que se encuentra ubicados en /usr/local/apache/etc.
  1. httpd.conf
    		# Port: The port the standalone listens to. For ports < 1023, you will
    (linea:36)	Port 80
    
    
    # ErrorLog: The location of the error log file. If this does not start (linea:81) ErrorLog /var/httpd/logs/error_log
    # The location of the access logfile (Common Logfile Format). (linea:101) CustomLog /var/httpd/logs/access_log common

    un ejemplo de la configuración de httpd.conf


  2. access.conf
    		# This should be changed to whatever you set DocumentRoot to.
    (linea:32)	<Directory /usr/local/etc/httpd/htdocs>
    
    
    # /usr/local/apache/share/cgi-bin should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured.
    (linea:58) <Directory /usr/local/etc/httpd/htdocs/cgi-bin>

    un ejemplo de la configuración de access.conf


  3. srm.conf
    (linea:19)	DocumentRoot /usr/local/etc/httpd/htdocs
    
    
    (linea:24) UserDir /usr/local/etc/httpd/users
    (linea:158) Alias /icons/ "/usr/local/etc/httpd/htdocs/icons/"
    (linea:163) ScriptAlias /cgi-bin/ "/usr/local/etc/httpd/htdocs/cgi-bin/"

    un ejemplo de la configuración de srm.conf



4.4 Administración de Apache
Para ejecutar apache, debo actualizar el archivo /etc/rc.d/rc.inet2, en el cual debo agregar las siguientes instrucciones:
ApServ="/usr/local/apache/sbin/apachectl"
ApConf="/usr/local/apache/etc/httpd.conf"
ApPid="/usr/local/apache/var/run/"


if [ -x $ApServ -a -f $ApConf ] ; then echo "Running http server..." $ApServ start fi

Adicionar estas lineas en /etc/rc.d/rc.inet2


Para bajar apache, debemos agregar las siguientes instrucciones en el archivo /etc/rc.d/rc.6
ApServ="/usr/local/apache/sbin/apachectl"
ApConf="/usr/local/apache/etc/httpd.conf"
ApPid="/usr/local/apache/var/run/"


if [ -n $ApPid ] ; then $ApServ stop echo "Stoped http server..." /bin/rm $ApPid/httpd* fi

Agregar estas lineas en: /etc/rc.d/rc.6



[home] [index] [contents] [previous] [next]