FSND project3 - Linux Server Configuration
This is my submission as the third project of the Full Stack Nano Degree from Udacity.
This project is about how to take a baseline installation of a Linux server and prepare it to host web applications. It involves how to secure the server from a number of attack vectors, install and configure a database server, and deploy an existing web application onto it.
- IP Address: 52.57.126.228
- SSH Port: 2200
- Domain Name: http://52-57-126-228.nip.io
- download the
grader_key
file (preferably into~/.ssh/
directory) ssh grader@52.57.126.228 -p 2200 -i ~/.ssh/grader_key
- Start a new Ubuntu Linux server instance on Amazon Lightsail.
- Login into instance using a provided SSH key for a default user
ubuntu
.
------- User Management - Disable remote login as user
root
. - Create a new user
grader
and give himsudo
access. - Create an SSH key pair for
grader
using thessh-keygen
tool.
------- Security - Update Package-Source-List and all currently installed packages.
- Change SSH hosting port from the default 22 into 2200.
- Configure
ufw
(Uncomplicated Firewall) to only allow connections for (SSH, HTTP, NTP) on ports (2200, 80, 123) respectively. - Force Key-based SSH authentication.
------- Prepare for deployment - Configure the local timezone to UTC.
- Install
Apache
web server. - Install
mod_wsgi
python application handler. - Install
PostgreSQL
database server. - Install
Git
version control system.
- Clone Item Catalog project.
- Construct the file structure for the app to work with Apache.
- Configure Python version and install application requirements.
- Configure WSGI files.
- Configure, setup and connect database.
- Update OAuth settings to use the domain name.
- Restart Apache service and use Apache logs for debugging.
- This project is mainly based on the Configuring Linux Web Servers course.
- For the deployment part, some external links were used: see this and this and this and this.