Let'S Encrypt Development Tutorials, Guides & Insights
Unlock 1+ expert-curated let's encrypt tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your let's encrypt skills on DeveloperBreeze.
Adblocker Detected
It looks like you're using an adblocker. Our website relies on ads to keep running. Please consider disabling your adblocker to support us and access the content.
Tutorial
python bash
Deploying a Flask Application on a VPS Using Gunicorn and Nginx
Paste the following:
# HTTP to HTTPS redirection
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name developerbreeze.com www.developerbreeze.com;
return 301 https://developerbreeze.com$request_uri;
}
# HTTPS Server Block
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name developerbreeze.com www.developerbreeze.com;
ssl_certificate /etc/letsencrypt/live/developerbreeze.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/developerbreeze.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
root /path/to/your-flask-app;
index index.html;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
include proxy_params;
proxy_pass http://unix:/path/to/your-flask-app/developerbreeze.sock;
}
location /static {
alias /path/to/your-flask-app/static;
}
location /favicon.ico {
alias /path/to/your-flask-app/static/favicon.ico;
}
location ~ /.well-known {
allow all;
}
}Aug 03, 2024
Read More