안녕하세요,
저는 디스커스에 아직은 초보이지만, 이 훌륭한 플랫폼에 이미 빠져버린 상태입니다.
VPS에 도커 버전을 설치했는데, Nginx를 리버스 프록시로, certbot을 사용하여 설정했을 때 처음에는 모든 것이 정상적으로 작동했습니다.
하지만 VPS를 포맷한 후, 동일한 설정을 적용했음에도 이제 이미지들이 보이지 않습니다. 이것이 흔한 문제라는 것을 읽었지만, 어떻게 수정해야 할지 모르겠습니다.
https://forumstatale.it/t/vignette-e-meme-storici/22
이전 설치에서는 https와 https 간의 혼합 콘텐츠(mixed content)에 대한 경고가 있었지만, https를 활성화하기 전에 업로드했던 이미지들을 단순히 제거함으로써 해결했습니다.
포럼이 새로 생성된 것이므로 지금도 같은 방법으로 해결할 수 있지만, 혹시 다시 포맷해야 하는 상황이 생겼을 때를 대비하여 제가 어디서 실수를 하고 있는지 알고 싶습니다.
nginx.conf (디스커스와 관련된 부분 및 상단의 세 가지 설정만 포함)
proxy_set_header X-Forwarded-Proto https;
client_max_body_size 500M;
proxy_set_header X-Real-IP $remote_addr; # 실제 클라이언트 IP 전달
server { # forumstatale.it
server_name forumstatale.it;
access_log logs/forum_statale_it.log main;
# 동적 콘텐츠 요청을 rails/turbogears/zope 등으로 전달
location / {
proxy_pass http://app;
}
listen 443 ssl; # Certbot 관리
ssl_certificate /etc/letsencrypt/live/forumstatale.it/fullchain.pem; # Certbot 관리
ssl_certificate_key /etc/letsencrypt/live/forumstatale.it/privkey.pem; # Certbot 관리
include /etc/letsencrypt/options-ssl-nginx.conf; # Certbot 관리
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # Certbot 관리
}
server {
if ($host = forumstatale.it) {
return 301 https://$host$request_uri;
} # Certbot 관리
listen 80;
server_name forumstatale.it;
return 404; # Certbot 관리
}
미리 감사드립니다.