freeCodeCamp/docs/flight-manuals/working-on-web-server-insta...

1.6 KiB

Work on Web Server instances

We are running load balanced (Azure Load Balancer) instances for our web servers. These servers are running NGINX which reverse proxy all of the traffic to freeCodeCamp.org from various applications running on their own infrastructures.

The NGINX config is available on this repository.

Installing pre-requisites

Perform updates to the OS packages by following this guide.

First install

TODO - Detailed Instructions

  1. Provision a VM on Azure.
  2. Install NGINX and configure from repository.
  3. Inatall Cloudflare origin certificates and upstream application config.
  4. Setup networking and firewalls.
  5. Add the VM to the load balancer backend pool.

Logging and Monitoring

  1. Check status for NGINX service using the below command:
sudo systemctl status nginx
  1. Logging and monitoring for the servers are available at:

https://amplify.nginx.com

Updating Instances (Maintenance)

Config changes to our NGINX instances are maintained on GitHub, these should be deployed on each instance like so:

  1. SSH into the instance and enter sudo
sudo su
  1. Get the latest config code.
cd /etc/nginx
git fetch --all --prune
git reset --hard origin/master
  1. Test and reload the config with Signals.
nginx -t
nginx -s reload