# خطأ في التحميل مع nginx أمام Discourse

**URL:** https://meta.discourse.org/t/upload-error-with-nginx-in-front-of-discourse/158807
**Category:** Self-hosting
**Created:** [26 يوليو 2020، 1:20ص UTC](https://meta.discourse.org/t/upload-error-with-nginx-in-front-of-discourse/158807 "2020-07-26T01:20:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![luckrill](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@luckrill](https://meta.discourse.org/u/luckrill)
#### Post date: [26 يوليو 2020، 1:20ص UTC](https://meta.discourse.org/t/upload-error-with-nginx-in-front-of-discourse/158807/1 "2020-07-26T01:20:49Z")

</div>

تكوين تطبيقي

```
templates:
  # - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/web.socketed.template.yml"
    #- "templates/web.china.template.yml"
## قم بإلغاء التعليق عن هذين السطرين إذا كنت ترغب في إضافة Lets Encrypt (https)
  #- "templates/web.ssl.template.yml"
  #- "templates/web.letsencrypt.ssl.template.yml"

## أي منافذ TCP/IP يجب أن يعرضها هذا الحاوية؟
## إذا كنت تريد من Discourse مشاركة منفذ مع خادم ويب آخر مثل Apache أو nginx،
## راجع https://meta.discourse.org/t/17247 للحصول على التفاصيل
expose:
    #- "2045:80" # http
    #- "2045:443" # https

```

تكوين nginx

```
location / {
    proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:;
    proxy_set_header Host $http_host;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Real-IP $remote_addr;
}

```

 ![discourse](https://global.discourse-cdn.com/meta/original/3X/e/2/e247e69398cebabdcb1bf717c969cd8233a7ee86.png)

كيف يمكنني حل هذه المشكلة؟

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [26 يوليو 2020، 4:07ص UTC](https://meta.discourse.org/t/upload-error-with-nginx-in-front-of-discourse/158807/2 "2020-07-26T04:07:20Z")

</div>

في إعدادات موقع Discourse:

تعيين `force_https` إلى TRUE

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [26 يوليو 2020، 5:29ص UTC](https://meta.discourse.org/t/upload-error-with-nginx-in-front-of-discourse/158807/3 "2020-07-26T05:29:42Z")

</div>

كيف تم التثبيت؟

يبدو أنك تستخدم أيضًا قاعدة بيانات PostgreSQL خارجية.

---

<div class="post-metadata">

### Author: ![luckrill](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@luckrill](https://meta.discourse.org/u/luckrill)
#### Post date: [26 يوليو 2020، 1:02م UTC](https://meta.discourse.org/t/upload-error-with-nginx-in-front-of-discourse/158807/4 "2020-07-26T13:02:44Z")

</div>

شكرًا جزيلاً لك.  
كل شيء على ما يرام الآن.
