This project is a part of the Udacity's Web Developer Nanodegree II. It involves configuring a Linux Web Server to serve a Flask Application using Mod_wsgi and Apache.
- IP Address : 13.232.29.223
- Public URL : http://ec2-13-232-29-223.ap-south-1.compute.amazonaws.com/catalog
- SSH Port : 2200
Run http://ec2-13-232-29-223.ap-south-1.compute.amazonaws.com/catalog to run the Item Catalog App.
- Create a folder in your home folder by issuing the command
mkdir .ssh
- Create a new file using
nano id_rsa
and paste in the content of the key file provided using Ctrl + Shift + v. - Issue the following commands for the required security changes:
chmod 700 .ssh
andchmod 600 .ssh/id_rsa
. - To connect to the server issue the following command in your local terminal (assuming the private key was stored in the file .ssh/id_rsa).
ssh grader@13.232.29.223 -p 2200 -i .ssh/id_rsa
- Made a new Ubuntu Server instance on Amazon Lightsail.
- Made a user account grader and gave grader the sudo permissions.
- Updated all packages.
- Changed the SSH Port from 22 to 2200.
- Removed the ability to login as root on the remote machine.
- Created a SSH Key and authorized it to be used on the Remote Machine. This enabled the ability to login as grader using key pair.
- Configured the UFW Firewall according to the specifications provided.
- Configured the timezone to UTC.
- Installed and configured Apache and Mod WSGI to serve an application.
- Cloned the Item Catalog Project and configured it to run on MOD WSGI + Apache Server.
- Made .git inaccessible.
- Configured PostgreSQL and app.py such that it connects to a new PSQL DB and not a SQLITE DB.
- Configured Google API to serve the application at the public URL.
- finger (To check the new user
grader
) - apache2 (Needed to serve a web application on the server)
- libapache2-mod-wsgi (Needed to serve a python application on the Apache2 Server)
- virtualenv (Installed with python-pip, needed for keeping a separate environment for this python project)
- httplib2 (Helper library, required by the Python App)
- requests (Helper library, required by the Python App)
- sqlalchemy (Helper library, required by the Python App)
- psycopg2 (Needed to connect to a postrgres database from python)
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps