Starbeamrainbowlabs
17e8923dff
All checks were successful
continuous-integration/laminar-elessar Build 47 succeeded in 1 minute 6 seconds .
1.4 KiB
1.4 KiB
Linux 201: Web Server Setup
Introduction
-
Goals
- Understand the process of setting up a web server
- Understand why security is important when setting a web server.
- Setup a basic web server to serve static files
-
Non-goals - links to useful tutorials will be provided at the end of this lab sheet
- Setting up HTTPS - This requires a domain name
Things to mention in the slide deck
- Apache vs Nginx
- Thread-based vs event-based servers
Basic Security
- Creating a non-root account
sudo
permissions- The Linux security model: Knowing why you're typing your password
- SSH
- Disable root login
- SSH Keys
- Firewall
Installing a Web Server
With our server secured, we can now install our web server. In this tutorial, we'll be using Nginx.
- systemd services
- Nginx is a service
- Installing Nginx
sudo apt install nginx
Configuration
/etc/nginx/nginx.conf
/etc/nginx/sites-available/*
/etc/nginx/sites-enabled/*