ubuntu 20.x
nginx
2. 설치
apt-get install letsencrypt -y
3. 인증서 발급
; example.com 도메인에 대해 와일드카드 인증서를 발급받는다.
certbot certonly --manual -d *.example.com -d example.com --preferred-challenges dns
; 메일주소 입력
; 동의 Y
; 동의 Y ...
; TXT 삽입문구 : DNS 설정에 추가
; TXT 삽입문구 : DNS 설정에 추가 (TXT가 2개임)
; 잠시 시간 대기 후 Enter [이때 Enter 치기 전에 네임서버에서 DNS 정보를 변경해야 함]
; 발급 완료
; 발급위치 : /etc/letsencrypt/live/
4. 인증서 설치
; 가상호스트별로 된 설정파일에 SSL 설정을 추가한다.
vim /etc/nginx/site-enabled/www.example.com
server {
listen 80;
listen [::]:80;
# SSL configuration
#
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
5. nginx 재시작
service nginx restart
; 실행이 안되면 웹로그 등을 열어본다.
댓글 없음:
댓글 쓰기