centos 시스템 은 certbot 를 이용 하여 https 인증 서 를 만 들 고 nginx 로 설정 합 니 다.
yum install certbot  다음 오류 발생
Failed:
  python-urllib3.noarch 0:1.10.2-5.el7
  pip 설치 python urllib 3 모듈
pip install --upgrade --force-reinstall 'requests==2.6.0' urllib3
  도움말 보기
certbot -h  아래 가 나타 나 면 설치 성공
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...
Certbot can obtain and install HTTPS/TLS/SSL certificates.  By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. The most common SUBCOMMANDS and flags are:
obtain, install, and renew certificates:
    (default) run   Obtain & install a certificate in your current webserver
    certonly        Obtain or renew a certificate, but do not install it
    renew           Renew all previously obtained certificates that are near
expiry
    enhance         Add security enhancements to your existing configuration
   -d DOMAINS       Comma-separated list of domains to obtain a certificate for
  (the certbot apache plugin is not installed)
  --standalone      Run a standalone webserver for authentication
  (the certbot nginx plugin is not installed)
  --webroot         Place files in a server's webroot folder for authentication
  --manual          Obtain certificates interactively, or using shell script
hooks
   -n               Run non-interactively
  --test-cert       Obtain a test certificate from a staging server
  --dry-run         Test "renew" or "certonly" without saving any certificates
to disk
manage certificates:
    certificates    Display information about certificates you have from Certbot
    revoke          Revoke a certificate (supply --cert-path)
    delete          Delete a certificate
manage your account with Let's Encrypt:
    register        Create a Let's Encrypt ACME account
  --agree-tos       Agree to the ACME server's Subscriber Agreement
   -m EMAIL         Email address for important account notifications
More detailed help:
  -h, --help [TOPIC]    print this message, or detailed help on a topic;
                        the available TOPICS are:
   all, automation, commands, paths, security, testing, or any of the
   subcommands or plugins (certonly, renew, install, register, nginx,
   apache, standalone, webroot, etc.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2. 인증서 생 성
certbot certonly --webroot -w /usr/local/html -d www.test.com  인증서 생 성 주소
/etc/letsencrypt/live/www.test.com  3. nginx 설정
server{
         listen 443 ssl;
  server_name www.test.com;
  ssl on;
  ssl_certificate /etc/letsencrypt/live/www.test.com/fullchain.pem; #2
  ssl_certificate_key /etc/letsencrypt/live/www.test.com/privkey.pem; #3
  ssl_session_cache shared:SSL:1m;
  ssl_session_timeout 5m;
  ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_prefer_server_ciphers on;
        error_page 403 /error.html;
        error_page 404 /error/404.html;
        location = /error.html {
          root  /home/tomcat/web/;
          allow all;
        }
         location  /error/ {
          root  /usr/local/nginx_html;
          allow all;
        }
location / {
        root /usr/local/html;
        index index.html index.htm;
    }
}
  재 설정
server {
        listen *:80;
        server_name www.test.com ; #                        
        return 301 https://www.test.com/;
    }
  4. nginx 를 다시 시작 합 니 다. 브 라 우 저 주 소 를 방문 하면 인증 서 를 볼 수 있 습 니 다.
5. 연장
certbot 생 성 인증 서 는 3 개 월 기한 이 만 료 되 어 연장 이 필요 합 니 다.
연장 명령 (certbot 설치 디 렉 터 리 에 들 어가 기 전에 nginx 를 닫 아야 합 니 다)
./letsencrypt-auto renew --force-renew  이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
간단! Certbot을 사용하여 웹 사이트를 SSL(HTTPS)화하는 방법초보자가 인프라 주위를 정돈하는 것은 매우 어렵습니다. 이번은 사이트를 간단하게 SSL화(HTTP에서 HTTPS통신)로 변경하는 방법을 소개합니다! 이번에는 소프트웨어 시스템 Nginx CentOS7 의 환경에서 S...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.