Configuring Nginx as a Reverse Proxy

This runbook outlines the steps to configure Nginx as a reverse proxy for an application. Prerequisites Access to the server Nginx installed Application running on a specific port Steps Install Nginx sudo apt install -y nginx Create Nginx Configuration File sudo nano /etc/nginx/sites-available/app_proxy Add the Configuration server { listen 80; server_name yourdomain.com; location / { proxy_pass http://localhost:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } Enable the Configuration sudo ln -s /etc/nginx/sites-available/app_proxy /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginx Verification Check the application at http://yourdomain....

Runbook.site

Setting Up SSL with Let's Encrypt (Nginx)

This runbook describes how to set up SSL for a website using Let’s Encrypt and Nginx. Prerequisites Access to the server Nginx installed Domain name pointing to the server Steps Install Certbot sudo apt update sudo apt install -y certbot python3-certbot-nginx Obtain SSL Certificate sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com Follow Certbot Prompts Enter your email address. Agree to the terms of service. Choose to redirect HTTP to HTTPS. Renew SSL Certificates sudo certbot renew --dry-run Verification Check your website at https://yourdomain....

Runbook.site