Configure production HTTPS with SSL certificates

This commit is contained in:
gamvo74 2026-02-25 09:02:22 -05:00
parent db7bfd52b0
commit 8d65a840c6
3 changed files with 23 additions and 4 deletions

View File

@ -49,9 +49,10 @@ services:
restart: always
ports:
- "80:80"
- "8080:8080"
- "443:443"
volumes:
- ./infrastructure/nginx/conf.d:/etc/nginx/conf.d
- /etc/letsencrypt:/etc/letsencrypt:ro
depends_on:
- api
- web

View File

@ -1,6 +1,15 @@
server {
listen 80;
server_name api.proselitigant.tech localhost;
server_name api.proselitigant.tech;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name api.proselitigant.tech;
ssl_certificate /etc/letsencrypt/live/proselitigant.tech/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/proselitigant.tech/privkey.pem;
# Security headers
add_header X-Frame-Options DENY;

View File

@ -1,6 +1,15 @@
server {
listen 8080;
server_name proselitigant.tech localhost;
listen 80;
server_name proselitigant.tech;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name proselitigant.tech;
ssl_certificate /etc/letsencrypt/live/proselitigant.tech/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/proselitigant.tech/privkey.pem;
# Security headers
add_header X-Frame-Options SAMEORIGIN;