HTTP - Ubuntu 24.04
Primero, empezaremos ejecutando los siguientes comandos:
sudo apt update
sudo apt upgrade
Ahora, instalaremos apache2
sudo apt install -y apache2
Comprobaremos el estado
systemctl status apache2
Y terminaremos la instalacion habilitando en el ufw el http y https
ss -ntl
apachectl -v
sudo ufw allow http
sudo ufw allow https
Ahora, en la terminal, deberemos escribir lo siguiente y modificaremos el index.html del servidor apache2
## Copiar Contenido de index.html ##
<html>
<head>
</head>
<body>
<h1>Bienvenidos al servidor Apache 2</h1>
<h2>Servicios en Red</h2>
<h3>AI1PC111</h3>
<h4>Grupo Alumnos</h4>
</body>
</html>
<head>
</head>
<body>
<h1>Bienvenidos al servidor Apache 2</h1>
<h2>Servicios en Red</h2>
<h3>AI1PC111</h3>
<h4>Grupo Alumnos</h4>
</body>
</html>
## Copiar Contenido de index.html ##
Ahora, deberemos crear nuestro favicon.ico y deberemos pegarlo en nuestra carpeta donde esta el index.html para posteriormente añadirlo a la pagina web
Y aparacera una pagina asi
PARA USER DIR
Deberemos escribir en la consola
Creamos un nuevo usuario (carpeta) en home
Y crearemos el index.html del nuevo usuario (carpeta)
Y con "sudo touch index.html" crearemos el index.html dentro de public_html
Y para editarlo con permisos de sudoers con "sudo gedit index.html"
##
alumno111@ai1pc111:/etc/apache2/mods-available$ ls userdir*
userdir.conf userdir.load
alumno111@ai1pc111:/etc/apache2/mods-available$ ls -la userdir*
-rw-r--r-- 1 root root 234 mar 18 2024 userdir.conf
-rw-r--r-- 1 root root 66 mar 18 2024 userdir.load
alumno111@ai1pc111:/etc/apache2/mods-available$ sudo systemctl restart apache2.service
alumno111@ai1pc111:/etc/apache2/mods-available$ sudo service apache2 restart
alumno111@ai1pc111:/etc/apache2/mods-available$ sudo /etc/init.d/apache2 restart
Restarting apache2 (via systemctl): apache2.service.
alumno111@ai1pc111:/etc/apache2/mods-available$
userdir.conf userdir.load
alumno111@ai1pc111:/etc/apache2/mods-available$ ls -la userdir*
-rw-r--r-- 1 root root 234 mar 18 2024 userdir.conf
-rw-r--r-- 1 root root 66 mar 18 2024 userdir.load
alumno111@ai1pc111:/etc/apache2/mods-available$ sudo systemctl restart apache2.service
alumno111@ai1pc111:/etc/apache2/mods-available$ sudo service apache2 restart
alumno111@ai1pc111:/etc/apache2/mods-available$ sudo /etc/init.d/apache2 restart
Restarting apache2 (via systemctl): apache2.service.
alumno111@ai1pc111:/etc/apache2/mods-available$
Comments
Post a Comment