We have to first install httpd service in our operating system.
httpd is the Apache HyperText Transfer Protocol (HTTP) server program designed to be run as a standalone daemon process.
yum install httpd
Then we have to disable our firewall and start the httpd service.
systemctl disable firewalld
systemctl enable httpd.service
systemctl start httpd
Now we go in the directory “/var/www/html” and create a html file that contains frontend of the website and the script to connect server to our OS.
Now change the directory to “var/www/cgi-bin” and make a Python with .py extension taht contains the backend code.
We have to make our python file executable for the guest user.
chmod +x <file_name>.py
In order to provide access to non-root user from my server, I made changes so that using the sudo command docker services can be accessed.
Now again change the directory from to “/etc/sudoers” and make the following changes.
Now we can access our website in web browser by entering the URL in the following format.
http://<IP Address of server>/<file_Name>.html