Latest Updates

Setup an Apache Web Server in a Docker Container


Task Objective:-

Configure HTTPD Server on Docker Container so we can use it as a webserver

What is Web-Server?

A web server is a computer where the web content is stored. Basically, a web server is used to host the websites but there exist other web servers also such as gaming, storage, FTP, email, etc.

What is Docker Container?

Docker containers are a technology that allows you to package and isolate applications with their entire runtime environment with all of the files necessary to run. This makes it easy to move the contained application between environments (dev, test, production, etc.)

To Perform this practical you need the Docker repo and we also have to configure it so we can install docker ultimately we can do our HTTPD demo.




 




Note: Before starting service you need to stop the firewall so you will not face any connectivity issue inside the docker

systemctl stop firewalld

 To start docker service use the command

systemctl start docker






 

Step 7: In this step, we will see a common problem that is if we exit the container and start again, the site is down. So we need a fix that issue



Step 8: In this step, we make this service permanent


After stopping this container your webserver will stop automatically


No comments