# Discourse 站点通过 IP 可加载，但通过域名仅显示头部

**URL:** <https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564>\
**Category:** Support\
**Created:** [2018年十二月18日 15:14 UTC](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564 "2018-12-18T15:14:23Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年十二月21日 00:54 UTC](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564/23 "2018-12-21T00:54:06Z")

</div>

You should start over from scratch and rebuild. Something is deeply wrong with your configuration.

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2018年十二月21日 02:33 UTC](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564/25 "2018-12-21T02:33:09Z")

</div>

Learned from a PM:

> [@guapic](#):
>
> Brings it back to the normal issue of the domain not loading properly but via IP its perfect. keep in mind all traffic is polled through via our reverse proxy as well on another server

When targeting your (non-cloudflared) reverse proxy:

```plaintext
○ → curl -k https://forum.pivx.org/assets/ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js | wc -c
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  8 575k 8 48746 0 0 73901 0 0:00:07 --:--:-- 0:00:07 73857
curl: (56) GnuTLS recv error (-9): A TLS packet with unexpected length was received.
48746

```

When targeting your actual server:

```plaintext
○ → curl -k http://192.0.2.100/assets/ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js | wc -c
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 575k 100 575k 0 0 1016k 0 --:--:-- --:--:-- --:--:-- 1017k
589450

```

Your reverse proxy is broken and you need to fix it. This is not a Discourse problem.

---

<div class="post-metadata">

**Author:** ![guapic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guapic/32/127117_2.png) [@guapic](https://meta.discourse.org/u/guapic)\
**Post date:** [2018年十二月21日 07:00 UTC](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564/26 "2018-12-21T07:00:51Z")

</div>

> [@supermathie](#):
>
> Your reverse proxy is broken and you need to fix it. This is not a Discourse problem.

When pointing the cloudflare A record to the normal server IP it doesn’t connect to the site. Only over the reverse proxy. thanks for the assistance thus far.

---

<div class="post-metadata">

**Author:** ![theopen-institute](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/theopen-institute/32/141988_2.png) [@theopen-institute](https://meta.discourse.org/u/theopen-institute)\
**Post date:** [2018年十二月22日 14:19 UTC](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564/27 "2018-12-22T14:19:22Z")

</div>

I’m getting these same errors too, on a fresh install. I have cloudflare for my root domain, but it’s bypassing on the subdomain I’ve installed discourse to `https://forum.theopen.institute`. I followed the instructions [here](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247) for running other sites on the same machine.

The strange thing is, each time, I am able to get most of the way through the welcome and installation process before I start getting the ERR\_SPDY\_PROTOCOL\_ERROR responses in console.

---

<div class="post-metadata">

**Author:** ![theopen-institute](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/theopen-institute/32/141988_2.png) [@theopen-institute](https://meta.discourse.org/u/theopen-institute)\
**Post date:** [2018年十二月28日 08:51 UTC](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564/28 "2018-12-28T08:51:25Z")

</div>

t turns out that (in my case at least) the problem was indeed outside Discourse. I had a permissions problem in my /var/lib/nginx/fastcgi folder. `chown`ing back over to my nginx got discourse working.

It sounds like OP’s issue was different, but since the symptoms and error messages were similar I thought I’d post an update for anyone coming through in the future.

---

<div class="post-metadata">

**Author:** ![guapic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guapic/32/127117_2.png) [@guapic](https://meta.discourse.org/u/guapic)\
**Post date:** [2018年十二月28日 09:08 UTC](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564/29 "2018-12-28T09:08:31Z")

</div>

My issue is solved, Turns out the reverse proxy was running out of disk space and thus couldn’t process the files.

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2018年十二月29日 07:59 UTC](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564/30 "2018-12-29T07:59:27Z")

</div>



[上一頁](https://meta.discourse.org/t/discourse-site-loads-via-ip-but-via-domain-only-header/104564.md?page=1)
