1. Home
  2. Como instalar un Web Server Apache en Fedora 34, Alma Linux, Centos 7

Como instalar un Web Server Apache en Fedora 34, Alma Linux, Centos 7


Instalando Web Server Apache en Fedora 34, Alma Linux, Centos 7


Notas: El siguiente tutorial, requiere acceso en modo terminal, acceso root y conocimiento técnico en Linux.

Los siguientes comandos instala El servicio httpd para configurar un servidor web Apache. El servicio HTTP usa 80/TCP.

1. Instalar Apache

# yum -y install httpd

# rm -f /etc/httpd/conf.d/welcome.conf

2. Configurar Apache

Editar el archivo de configuración, buscar los siguientes textos y reemplazar

# vi /etc/httpd/conf/httpd.conf

ServerName localhost #O tudominio.pe:80

AllowOverride All

DirectoryIndex index.html index.cgi index.php

ServerTokens Prod  #Mejora la seguridad

3. Levantar y habilitar servicio

# systemctl start httpd
# systemctl enable httpd

4. Habilitar el Firewall

Si usa iptables:

# /etc/sysconfig/iptables
-A INPUT -p tcp -m tcp –dport 80 -j ACCEPT

# service iptables restart

Si usa firewalld:

#firewall-cmd –add-service=http –permanent
# firewall-cmd –reload

5. Crear tu primera web

# vi /etc/httpd/conf/httpd.conf

<html>rn<body>rn<H1>rnTest Pagern</H1>rn</body>rn</html>
Updated on 5 Diciembre, 2023
Was this article helpful?