Configure production HTTPS with SSL certificates
This commit is contained in:
parent
db7bfd52b0
commit
8d65a840c6
@ -49,9 +49,10 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "8080:8080"
|
- "443:443"
|
||||||
volumes:
|
volumes:
|
||||||
- ./infrastructure/nginx/conf.d:/etc/nginx/conf.d
|
- ./infrastructure/nginx/conf.d:/etc/nginx/conf.d
|
||||||
|
- /etc/letsencrypt:/etc/letsencrypt:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
- web
|
- web
|
||||||
|
|||||||
@ -1,6 +1,15 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
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
|
# Security headers
|
||||||
add_header X-Frame-Options DENY;
|
add_header X-Frame-Options DENY;
|
||||||
|
|||||||
@ -1,6 +1,15 @@
|
|||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 80;
|
||||||
server_name proselitigant.tech localhost;
|
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
|
# Security headers
|
||||||
add_header X-Frame-Options SAMEORIGIN;
|
add_header X-Frame-Options SAMEORIGIN;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user