enable-https
작성
수정
- Nginx를 통해서 https를 직접 할 수 있다.
sudo apt update
sudo apt install nginx
sudo systemctl enable nginx
sudo systemctl start nginx
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d yunseong.shop
- /etc/nginx/sites-available/https.conf
server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/yunseong.shop/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yunseong.shop/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
server_name yunseong.shop;
location / {
proxy_pass http://localhost:8000;
}
}
sudo ln -s /etc/nginx/sites-available/https.conf /etc/nginx/sites-enabled/