# バックアップが復元され、画像が壊れています

**URL:** <https://meta.discourse.org/t/backup-restored-and-images-are-broken/159206>\
**Category:** Self-hosting\
**Created:** [2020 年 7 月 29 日午後 7:35 UTC](https://meta.discourse.org/t/backup-restored-and-images-are-broken/159206 "2020-07-29T19:35:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![theRAGEhero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/theragehero/32/184810_2.png) [@theRAGEhero](https://meta.discourse.org/u/theRAGEhero)\
**Post date:** [2020 年 7 月 29 日午後 7:35 UTC](https://meta.discourse.org/t/backup-restored-and-images-are-broken/159206/1 "2020-07-29T19:35:14Z")

</div>

みなさん、こんにちは。  
Discourse はまだ初心者ですが、すでにこの素晴らしいプラットフォームに魅了されています。

VPS に Docker 版をインストールし、Nginx をリバースプロキシとして使用し、certbot で設定したところ、すべて正常に動作していました。

VPS をフォーマットする必要があり、同じ設定で再構築したところ、画像が表示されなくなりました。これは一般的な問題だと読みましたが、どう解決すればよいか見当がつきません。

[https://forumstatale.it/t/vignette-e-meme-storici/22](https://forumstatale.it/t/vignette-e-meme-storici/22)

以前のインストールでは、https と http の混在に関する警告がありましたが、https を有効化する前にアップロードした画像を削除することで簡単に解決しました。

今はフォーラムが新しく、同じ方法で対応することも可能ですが、今後再度フォーマットする必要がある場合に、自分がどこを間違えているのか理解しておきたいと考えています。

nginx.conf（Discourse に関連する部分と、上部の 3 つの設定のみ）

```plaintext

     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 によって管理されています

}

```

ご協力いただき、ありがとうございます。

---

_[View the full topic](https://meta.discourse.org/t/backup-restored-and-images-are-broken/159206)._
