메뉴 건너뛰기

정보자료게시판

장비/디자인/구조

Lets Encrypt SSL 가상호스트 설정

by 라키 posted Nov 24, 2017
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄

가상호스트 설정으로 서브도메인을 SSL에 추가했더니 https 서브도메인 주소를 치면 메인 도메인 주소로 넘어간다.

끙끙대다가, 서버도 다운됐다가 난리치다가 아래와 같은 방법으로 해결.

 

Lets Encrypt SSL 가상호스트 설정

  1. www.momsy.co.kr, momsy.co.kr등록, shop.momsy.co.kr 등록
  2. /etc/httpd/conf.d/vhost-le-ssl.conf의 해당부분을 아래와 같이 수정

<IfModule mod_ssl.c>

<VirtualHost *:443>

DocumentRoot "/home/momsyshop01/www"

ServerName shop.momsy.co.kr

ErrorLog "/hdd02/logs/momsy01_Error.log"

CustomLog "/hdd02/logs/momsy01_Access.log" common

Include /etc/letsencrypt/options-ssl-apache.conf

Include /etc/letsencrypt/options-ssl-apache.conf

SSLCertificateFile /etc/letsencrypt/live/shop.momsy.co.kr/cert.pem

SSLCertificateKeyFile /etc/letsencrypt/live/shop.momsy.co.kr/privkey.pem

Include /etc/letsencrypt/options-ssl-apache.conf

SSLCertificateChainFile /etc/letsencrypt/live/shop.momsy.co.kr/chain.pem

</VirtualHost>

</IfModule>

 

<IfModule mod_ssl.c>

<VirtualHost *:443>

DocumentRoot "/home/momsy01/www"

ServerName momsy.co.kr

ServerAlias www.momsy.co.kr *.momsy.co.kr

ErrorLog "/hdd02/logs/momsy01_Error.log"

CustomLog "/hdd02/logs/momsy01_Access.log" common

Include /etc/letsencrypt/options-ssl-apache.conf

Include /etc/letsencrypt/options-ssl-apache.conf

SSLCertificateFile /etc/letsencrypt/live/www.momsy.co.kr/cert.pem

SSLCertificateKeyFile /etc/letsencrypt/live/www.momsy.co.kr/privkey.pem

Include /etc/letsencrypt/options-ssl-apache.conf

SSLCertificateChainFile /etc/letsencrypt/live/www.momsy.co.kr/chain.pem

</VirtualHost>

</IfModule>


위로