Python CGI Programmaning is the web app created using Python as backend and HTML-CSS as Frontend. We used Apache2 server to host the web app. The App is created on Virtual Machine.
- Install Apache2 Web Server
sudo apt-get install apache2
- Check the firewall
sudo ufw allow list
- Check if Apache2 is running
sudo systemctl status apache2
- If Apache2 is stopped, run
sudo systemctl start apache2
- Open
nano /var/www/html/index.html
and add the content - Create a directory
mkdir /var/www/cgi-bin
- Add content
nano /var/www/cgi-bin/test.py
Now run the script at yourlocalhost or the Public Ip if is running in the VM