nginx 커스터마이징 시 SSL 오류: 모든 웹 브라우저에서 인증서가 신뢰되지 않음

같은 Discourse 서버에서 다른 작업을 제공하기 위해 일부 설정을 변경했습니다.

일부 브라우저에서는 웹사이트에 액세스할 때 SSL 알림이 표시됩니다(흰색 화면)

파일: /var/discourse/containers/app.yml

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Lets Encrypt(https)를 추가하려면 다음 두 줄의 주석을 해제하세요
  # - "templates/web.ssl.template.yml"
  # - "templates/web.letsencrypt.ssl.template.yml"
  - "templates/web.socketed.template.yml"

위와 같이 변경했을 때 자동 SSL 생성 기능이 실행되지 않아 다음과 같이 수동으로 처리했습니다.

cd /var/discourse
./launcher enter app
"/shared/letsencrypt"/acme.sh --cron --home "/shared/letsencrypt" --force
exit

그 다음 systemctl restart nginx

제 nginx 설정은 다음과 같습니다.

server {
    listen 443 ssl http2;

    ssl on;

    ssl_certificate         /var/discourse/shared/standalone/letsencrypt/thuvienmuasam.com/thuvienmuasam.com.cer;
    ssl_certificate_key     /var/discourse/shared/standalone/letsencrypt/thuvienmuasam.com/thuvienmuasam.com.key;

지난번에는 문제가 없었지만, 이번에는 위와 같은 오류가 발생합니다.

제가 올바르게 수행했는지 알려 주시겠습니까?

이 질문이 약 6개월 전에 제기되었음을 알고 있습니다. 따라서 아직 해결책을 찾고 계신다면, 다음을 시도해 볼 수 있습니다:

  • ca-bundle 내용(인증서)을 복사하여 도메인 인증서 뒤에 붙여넣습니다. 위치는 Certificate (CRT) 필드입니다.

예를 들어 아래처럼 CRT 필드에 도메인 인증서와 ca-bundle 인증서 두 개가 함께 들어가는 것입니다:

Certificate (CRT)

-----BEGIN CERTIFICATE-----

(domain cert)

-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----

(ca-bundle cert)

-----END CERTIFICATE-----

파일 위치: /var/discourse/shared/standalone/letsencrypt/thuvienmuasam.com

이 방법으로 해결된다면, 이는 호스팅 제공업체에서 인증서가 설치되는 방식일 뿐입니다.