Take a baseline installation of a Linux distribution on a virtual machine and prepare it to host your web applications, to include installing updates, securing it from a number of attack vectors and installing/configuring web and database servers.
-
IP address: 54.179.134.13
-
Accessible SSH port: 2200
-
Application URL: http://54.179.134.13.xip.io
- Logging into the server: Go to a Linux terminal, and login as
grader
via the following command:ssh -i ~/.ssh/LightsailDefaultPrivateKey.pem -p 2200 [email protected]
- Logging in as
root
has been disabled. - Once logged in, you will then have
sudo
access.
- Firewall settings: Key in
sudo ufw status
to see that the firewall has been set to allow only 3 ports: SSH (2200), HTTP(80), and NTP(123). - RSA key settings are required for login.
- Application is up-to-date via keying in
sudo apt-get update
andsudo apt-get upgrade
. - SSH is only via port 2200.
- Visit site at http://54.179.134.13.xip.io
- Log in to the site using your Google ID, which takes you back to the main Catalog page.
- Play around with the information already uploaded.
- As a logged in user, you will be able to add, edit, and delete both subcatalog and item entries that you own only.
- Program runs exclusively on Python3, and uses the following frameworks/tools:
apache2
,flask
,psycopg2
,httplib2
,oauth2client
,virtualenv
,mod-wsgi-py3
, andsqlalchemy
. - Database used is SQLite3 (The PostgreSQL was not used).
- Notable configurations made:
- Project borrows from my previous Udacity Full Stack Project: https://github.com/wallacewong82/Catalog_project
- Added
grader
account into/etc/sudoers.d
- For
/etc/apache2/sites-enabled/000-default.conf
, the WSGI daemon method was used. - The database file
catalog.db
had to have access rights changed tochmod 777
for both the file and the/html
folder housing it. - For interest, the following error log was extremely useful:
/var/log/apache2/error.log
.
Special Thanks to rrojoson for his very helpful README!