728x90
1.certbot install
sudo apt update
sudo apt install certbot python3-certbot-nginx
2. 인증서발급
sudo certbot --nginx -d 도메인 -d www.도메인.com
3. 인증서확인
ls /etc/letsencrypt/live/도메인
4. nginx.conf 수정
server {
listen 80;
server_name 도메인;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name 도메인;
ssl_certificate /etc/letsencrypt/live/도메인/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/도메인/privkey.pem;
root /usr/share/nginx/html;
index index.html;
location /api/ {
proxy_pass http://백엔드컨테이너:포트;
}
location / {
try_files $uri $uri/ /index.html =404;
}
}'서버' 카테고리의 다른 글
| ubuntu - nginx, next 도커 셋팅 (0) | 2026.07.11 |
|---|---|
| Window11 OS 설치시 (업그레이드를 시작하고부팅한것 같습니다.. 컨펌창 노출시 해결) (0) | 2026.05.23 |
| Windos11 OS 설치시 USB인식 안되는 경우 (boot from efi file) (0) | 2026.05.23 |
| 외국 IP차단시 구글 검색결과 미노출 (synology or CloudFlare) (0) | 2026.05.22 |
| 마이바티스 에러 해결 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) (0) | 2026.05.14 |