Apache와 Nginx에서 SSL 파일 형식 통합하기

2026. 3. 22. 09:14·☁️Cloud

apache와 nginx에서 쓰는 SSL 파일형식이 다름. 각각 만들어줘야 하지만, 통합해서 쓸 수 있는 방법이 있다.

인증서와 체인 파일을 하나로 합친 파일을 생성하고, 이를 웹 서버에서 공통적으로 사용하도록 설정하면 된다.

cat star_crt.pem ChainCA.crt RootCA.crt > fullchain.pem

fullchain.pem 파일과 Private.key 파일을 웹 서버 설정

apache 설정

<VirtualHost *:443>
    ServerName example.com

    SSLEngine on
    SSLCertificateFile /path/to/fullchain.pem
    SSLCertificateKeyFile /path/to/Private.key
</VirtualHost>

nginx 설정

server {
    listen 443 ssl;
    server_name example.com;

    ssl_certificate /path/to/fullchain.pem;
    ssl_certificate_key /path/to/Private.key;
}

✅ AWS SSL 인증서 등록하기

1. SSL 인증서(AWS 콘솔에서 “Certificate body”):

star_newssalad_com_crt.pem 파일의 내용을 사용합니다. 이 파일은 기본 인증서 파일입니다.

2. 중간 인증서 (AWS 콘솔에서 “Certificate chain”):

ChainCA.crt와 RootCA.crt 파일을 결합한 내용을 사용해야 합니다. 이 두 파일을 합쳐서 중간 인증서로 등록하면 됩니다.

cat ChainCA.crt RootCA.crt > certificate_chain.pem

3. 개인 키 (AWS 콘솔에서 “Certificate private key”):

Private.key 파일의 내용을 사용합니다.


  • Certificate body: star_newssalad_com_crt.pem의 내용
  • Certificate chain: certificate_chain.pem의 내용 (위에서 생성한 파일)
  • Certificate private key: Private.key의 내용

암호화된 개인 키 복호화

만약 .key 파일이 암호화되어 있다면, AWS에서는 복호화된 개인 키가 필요합니다. 개인 키가 암호화된 경우 openssl 명령을 사용해 암호를 제거할 수 있습니다.

openssl rsa -in Private.key -out Private_unencrypted.key
저작자표시 비영리 변경금지 (새창열림)

'☁️Cloud' 카테고리의 다른 글

NHN Cloud에서 인증서 설정하기  (0) 2026.03.22
'☁️Cloud' 카테고리의 다른 글
  • NHN Cloud에서 인증서 설정하기
Diven
Diven
  • Diven
    Diven
    Diven
  • 전체
    오늘
    어제
    • 분류 전체보기 (110) N
      • ☁️Cloud (21) N
        • AWS (2)
        • Alibaba (14) N
        • OCI (1)
        • AWS: Certified Solution Arc.. (0)
        • AWS: Certificate Advanced N.. (2) N
      • 📊DB (13)
        • MongoDB (8)
        • MariaDB (2)
        • PostgreSQL (2)
        • MySQL (1)
      • 🧑🏽‍💻Dev:Lang (9)
        • C++ (0)
        • GO (1)
        • Python (8)
      • ⚙️DevOps (4)
        • CICD (0)
        • Jenkins (4)
      • 🐳Docker (15)
      • 🪢laC (0)
      • ⚓K8s (7)
      • 🐧Linux (25)
      • 🖥️Monitoring (10)
        • Grafana (1)
        • Prometheus (6)
        • Loki (1)
        • ELK (2)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    linux
    AWS
    jenkins
    Alibaba
    NGINX
    alertmanager
    k8s
    centOS7
    MySQL
    PolarDB
    db
    Python
    mongoDB
    Cloud
    mariadb
    prometheus
    알리바바 클라우드
    docker
    SSL
    alb
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.6
Diven
Apache와 Nginx에서 SSL 파일 형식 통합하기
상단으로

티스토리툴바