서버가 꺼져 있습니다. X-Forwarded-Proto는 제 서버 블록에 이미 포함되어 있습니다. 따라서 여러분이 공유해 주신 링크들을 기준으로 제가 아직 적용하지 않은 요소는 다음과 같습니다:
# 기본 템플릿 사용; 컨테이너 템플릿별 기능을 줄이기 위해 축소 가능: # - "templates/cron.template.yml" # cron은 이제 기본 이미지에 포함됨 - "templates/postgres.template.yml" - "templates/redis.template.yml" - "templates/sshd.template.yml" - "templates/web.template.yml" # - "templates/web.ssl.template.yml" # 제거 - https는 외부 nginx가 처리 - "templates/web.ratelimited.template.yml" - "templates/web.socketed.template.yml" # <-- 추가됨 # 어떤 포트를 노출할 것인가? # expose: 전체 섹션 주석 처리
거기서 틀렸습니다. HTTPS 강제 사용이 활성화되어 있다면, Discourse는 모든 링크를 https로 보내야 합니다. 포럼과 관련된 모든 링크는 https를 통해 로드되어야 합니다. 여전히 권장되는 방식이 아닌 이상한 방식으로 진행한다면, 그건 전적으로 본인의 책임입니다. 우리가 도울 수 있는 것은 작동하는 표준 절차까지만입니다.
원격 서버(같은 네트워크 내) – 모든 예제가 Nginx가 Discourse와 동일한 서버에서 실행된다고 가정하는 것 같습니다. 저는 proxy_pass를 사용하여 다른 내부 IP를 호출하고 있습니다.
왜 이렇게 했을까요? 더 높은 보안과 리소스 분산 때문입니다. 컨테이너와 VM 두 가지 방식으로 서비스를 분리한 이유와 같습니다. 제안된 문서들은 모든 서비스가 동일한 서버에서 실행되는 상황을 더 선호하는 것 같습니다.
위에서 설명한 조건들이 꽤 흔할 것이라고 생각합니다. 만약 이 중 어떤 것이 proxy_pass 조건을 수용할 수 있다면, 제 설정을 그에 맞게 조정하는 데 기꺼이 응하겠습니다. ‘모든 달걀을 한 바구니에 담지 않는’ 상황을 피하려고 하는데, 단순히 그 이유만으로 "혼자 알아서 하세요"라는 일괄적인 답변을 받는 것은 다소 부당하다고 느낍니다.
## This is the all-in-one, standalone Discourse Docker container template ## ## After making changes to this file, you MUST rebuild ## /var/discourse/launcher rebuild app ## ## BE *VERY* CAREFUL WHEN EDITING! ## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT! ## visit http://www.yamllint.com/ to validate this file as needed
templates: - "templates/postgres.template.yml" - "templates/redis.template.yml" - "templates/web.template.yml" - "templates/web.ratelimited.template.yml" ## Uncomment these two lines if you wish to add Lets Encrypt (https) #- "templates/web.ssl.template.yml" #- "templates/web.letsencrypt.ssl.template.yml"
## which TCP/IP ports should this container expose? ## If you want Discourse to share a port with another webserver like Apache or nginx, ## see https://meta.discourse.org/t/17247 for details expose: - "80:80" # http - "443:443" # https
## Set db_shared_buffers to a max of 25% of the total memory. ## will be set automatically by bootstrap based on detected RAM, or you can override db_shared_buffers: "1024MB"
## can improve sorting performance, but adds memory usage per-connection #db_work_mem: "40MB"
## Which Git revision should this container use? (default: tests-passed) #version: tests-passed