fix: Add HTTPS configuration with SSL to nginx.dev.conf
This commit is contained in:
@@ -2,9 +2,38 @@ upstream frontend {
|
|||||||
server frontend:5173;
|
server frontend:5173;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ── HTTP Development Server ──
|
# ── HTTP → HTTPS Redirect ──
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
|
server_name dociva.io www.dociva.io;
|
||||||
|
|
||||||
|
# Let's Encrypt challenge
|
||||||
|
location /.well-known/acme-challenge/ {
|
||||||
|
root /var/www/certbot;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Redirect all other traffic to HTTPS
|
||||||
|
location / {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── HTTPS Server ──
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name dociva.io www.dociva.io;
|
||||||
|
|
||||||
|
# SSL Certificate
|
||||||
|
ssl_certificate /etc/letsencrypt/live/dociva.io/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/dociva.io/privkey.pem;
|
||||||
|
|
||||||
|
# SSL Configuration
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
ssl_session_cache shared:SSL:10m;
|
||||||
|
ssl_session_timeout 10m;
|
||||||
|
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
resolver 127.0.0.11 valid=30s ipv6=off;
|
resolver 127.0.0.11 valid=30s ipv6=off;
|
||||||
set $backend_upstream backend:5000;
|
set $backend_upstream backend:5000;
|
||||||
|
|||||||
Reference in New Issue
Block a user