Skip to content

Commit

Permalink
feat: SSL 인증 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
14hhan committed Nov 25, 2021
1 parent d4f4cd3 commit 4433cfe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 11 additions & 1 deletion config/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ upstream vote_mailedit {

server {

listen 80;
listen 443 ssl;

server_name vote-mailedit.kro.kr;

ssl_certificate /etc/nginx/ssl/vote-mailedit.kro.kr/fullchain1.pem;
ssl_certificate_key /etc/nginx/ssl/vote-mailedit.kro.kr/privkey1.pem;

location / {
proxy_pass http://vote_mailedit;
Expand All @@ -20,4 +25,9 @@ server {
location /media/ {
alias /home/app/web/media/;
}

location ~/.well-known/acme-challenge {
allow all;
root /var/www/certbot;
}
}
7 changes: 6 additions & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: '3.8'
services:

web:
Expand All @@ -24,10 +24,15 @@ services:
container_name: nginx
build: ./config/nginx
volumes:
- type: bind
source: /home/app/web/certbot/conf/archive
target: /etc/nginx/ssl
- /home/app/web/certbot/data:/var/www/certbot
- static:/home/app/web/static
- media:/home/app/web/media
ports:
- "80:80"
- "443:443"
depends_on:
- web

Expand Down

0 comments on commit 4433cfe

Please sign in to comment.