Docker에서 nginx reverse proxy + ssl 구현하기

junsangyu·2022년 11월 6일
0

Dockerfile

FROM nginx:latest

COPY nginx.conf /etc/nginx/nginx.conf

nginx.conf

events {}
http {
  server {
    listen 443 ssl;

    server_name ...;

    ssl_certificate /etc/letsencrypt/live/.../fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/.../privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
      proxy_pass http://localhost:8082;
    }
  }
}
profile
👨🏻‍💻

0개의 댓글