2024. 12. 9. 11:18

1. 도메인 설정

2. nginx 설치 후 실행

3. certbot 설치

sudo apt install certbot python3-certbot-nginx

 

4. 인증서 발급

sudo certbot --nginx -d apple.com

 

5. 접속 확인

https://apple.com

 

Apple

Discover the innovative world of Apple and shop everything iPhone, iPad, Apple Watch, Mac, and Apple TV, plus explore accessories, entertainment, and expert device support.

www.apple.com

 

6. http에서 https로 redirection

server {

  listen 80;

  server_name apple.com;

  return 301 https://$host$request_uri;

}

 

7. 설정 후 nginx 재시작 및 테스트

 

sudo nginx -t

sudo systemctl restart nginx