Can anyone guide me through the process of Docker Exec Operation where it says to make the apache2 to listen on port … inside the container kkloud.
my steps: SSh into the server
docker exec -it kkloud /bin/bash
apt update
apt install apache2
i get stuck after opening the apache2.conf file. I donot see any thing to make listen to port …
Need help. Thanks
You need to look in the ports.conf
file and also the default site configuration.
in ports.conf i have changed all the listen part to the specific port and while restarting the apache2, i have been getting error message. should i restart the apache2, outside docker container or inside the container after doing “docker exec -it kkloud /bin/bash”
You have been asked to work inside the container, so you restart the apache2 service in the container. If you have an error when you start apache2 in the container then you have made an incorrect change in the configuration file(s).
this worked for me:
ssh into the server.
docker exec -it kkloud /bin/bash
apt install apache2
apt update
vim /etc/apache2/apache2.conf
added these lines: “Listen port_number
ServerName ip_address” at last of the conf file.
and service apache2 restart