| Apache es un servidor web HTTP para plataformas Unix, Windows y Macintosh. Es el más usado del mundo. |
| |
| 1. Verificar si está instalado. Si no, proceder a instalarlo: |
| #yum install apache |
| o |
| #apt-get install apache2 |
| 2. Abrir el archivo de configuración: |
| #vi /etc/httpd/conf/httpd.conf |
| 3. Verificar la correcta configuración de los siguientes parámetros y editarlos según lo requerido: |
| ServerRoot /etc/httpd |
| Port 80 |
| User www-data |
| Group www-data |
| ServerAdmin micorreo@dominio.com |
| DocumentRoot /var/www |
| DirectoryIndex index.html index.htm index.cgi index.php |
| 4. Iniciar el servicio |
| #/etc/init.d/httpd start |
| 5. Realizar una prueba desde un navegador Web |
| #lynx 127.0.0.1 |
| |
| Si está disponible el comando service (generalmente no viene instalado por defecto), podrá manejar el Apache de la siguiente forma: |
| #service httpd status(Para ver el estado del servicio) |
| #service httpd start(Para iniciar el servicio) |
| #service httpd stop(Para detener el servicio) |
| #service httpd restart(Para reiniciar el servicio) |