certbot 대화형으로 사용할 경우 주의 강제 이동 설정 됨)

# certbot
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: 설정된 도메인들
2.
3.
...
6: test.test.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 6
Requesting a certificate for test.test.com
Performing the following challenges:
http-01 challenge for test.test.com
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/httpd/conf.d/virtual-le-ssl.conf
Deploying Certificate to VirtualHost /etc/httpd/conf.d/virtual-le-ssl.conf
Redirecting vhost in /etc/httpd/conf.d/virtual.conf to ssl vhost in /etc/httpd/conf.d/virtual-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://test.test.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/test.test.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/test.test.com/privkey.pem
   Your certificate will expire on 2021-05-26. To obtain a new or
   tweaked version of this certificate in the future, simply run
   certbot again with the "certonly" option. To non-interactively
   renew *all* of your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

이렇게 동작하면

/etc/httpd/conf.d/virtual-le-ssl.conf 가 자동 생성되며
/etc/httpd/conf.d/virtual.conf  에 해당 도메인에

RewriteEngine on
RewriteCond %{SERVER_NAME} =test.test.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

위 구문이 추가된다.
이 구문은 http -> https 강제 이도이며, 301로 이동하기에.. 
한번 적용되면 http 로 돌리기 힘들다.(돌릴려면 브라우저 캐시 데이터 지워야함)

댓글
  • No Nickname
    No Comment
  • 권한이 없습니다.
    {{m_row.m_nick}}
    -
제목 작성자 날짜
공대여자
공대여자
mins01
공대여자
공대여자
공대여자
공대여자
공대여자
#qr
공대여자
공대여자
공대여자
공대여자
공대여자
공대여자
공대여자
공대여자
공대여자
공대여자