* 발급받은 인증서는 /etc/letsencrypt/live/[인증서이름] 에 저장된다. cert.pem - 인증서 파일 chain.pem - 인증서 발급자 파일 fullchain.pem - cert.pem 과 chain.pen 을 하나로 합쳐놓은 파일 privkey.pem - 인증암호를 해독하는 개인키
Apache2 서버에서는 cert.pem, chain.pem, privkey.pem 을, Nginx 서버에서는 fullchain.pem, privkey.pem 을 사용한다.
* Nginx의 서버설정 변경 [code] server { listen 80; listen [::]:80;
server_name www.test.com;
# 모든 http 요청을 https로 301 리다이렉트한다 return 301 https://$server_name$request_uri;
root /var/www/html; index index.html index.htm index.php;
location / { try_files $uri $uri/ =404; }
location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; } }
server { listen 443; listen [::]:443;
server_name www.test.com; root /var/www/html; index index.html index.htm index.php;