Inicio » Servidores Virtuales Privados
Este documento explica cómo instalar, habilitar y configurar Nginx en dos de los sistemas operativos más comunes en servidores: Ubuntu 22.04 y AlmaLinux 8.
sudo apt update
sudo apt upgrade -y
sudo apt install nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx
sudo systemctl status nginx
Si todo está correcto, deberías ver que el servicio aparece como active (running).
sudo ufw allow 'Nginx Full'
sudo ufw reload
Ahora puedes acceder desde el navegador a http://tu-ip y deberías ver la página de bienvenida de Nginx.
sudo dnf update -y
sudo dnf install nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx
sudo systemctl status nginx
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
Luego visita http://tu-ip y verifica que Nginx esté funcionando correctamente.
sudo systemctl restart nginx
sudo systemctl stop nginx
sudo nginx -t
/var/log/nginx/access.log
/var/log/nginx/error.log
sudo apt remove nginx nginx-common -y
sudo apt autoremove -y
sudo dnf remove nginx -y