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}}
    -
목록형 📷 갤러리형
제목
[기본형] HTML (with 부트스트랩5.3 , jquery 3.7, vue.js)
유용한 리눅스(LINUX) 명령어
[공지] 기술 게시판
3.31
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.10
4.11
4.12
4.13
4.14
4.15
4.16
4.18
4.19
4.20
4.21
4.22
4.23
4.24
4.25
4.26
4.27
4.28
4.29
4.30
5.1
5.2
5.3
5.4