shlogg · Early preview
Shakhzhakhan Maxudbek @xinitd

Configuring Nginx As Reverse Proxy And HTTPS Redirect

Configure Nginx as reverse proxy & force HTTPS with self-signed SSL certificate: install Nginx, generate cert/key, configure server block, create symlink & restart service for secure web app hosting.

Nginx is very powerful WEB-server. The primary goal of Nginx - answering on clients' requests. It can serve html, php and static files (css, js, images, etc...). Also Nginx maybe configured as load balancer. This tutorial explain, how to configure Nginx as frontend for your web-based application (reverse proxy) and force redirect HTTP to HTTPS (HSTS - HTTP Strict Transport Security technology).
Installing Nginx from Advanced Packaging Tool (APT) package manager:

sudo apt install nginx -y

    
    

    
    




Firewall configuration. If you have enabled UFW, create rule for allowing all Ng...