# Discourse smesso di funzionare con errori 404

**URL:** <https://meta.discourse.org/t/discourse-stopped-working-with-404-errors/106997>\
**Category:** Self-hosting\
**Created:** [20 Gennaio 2019, 12:56am UTC](https://meta.discourse.org/t/discourse-stopped-working-with-404-errors/106997 "2019-01-20T00:56:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Bruce\_Bates](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bruce_bates/32/122887_2.png) [@Bruce\_Bates](https://meta.discourse.org/u/Bruce_Bates)\
**Post date:** [20 Gennaio 2019, 12:56am UTC](https://meta.discourse.org/t/discourse-stopped-working-with-404-errors/106997/1 "2019-01-20T00:56:27Z")

</div>

Discourse was working great for a few months, then I wake up to find the page won’t load. Not sure if something changed in my system’s config or what. I tried `sudo ./launcher rebuild app` that didn’t seem to help. Then I tried `sudo ./discourse-setup` again, that got the site to at least load.

The problem is its loading a blank white page. When I check the inspector it returns pretty much all js files as 502 gateway errors. If I load the site on http instead of https, the errors are all 404 instead of 502.

I did a `sudo ./laucher enter app` and verified all the files exist - and they do, so I am at a complete loss. I was thinking perhaps an error in my nginx front end configuration, but I see nothing out of the ordinary.

Is there something I have forgotten or am I doing something incorrectly in my config or what could be going on?

**my nginx.conf**

```
server {
  listen my.ip.address:80;
  server_name mydomain.name;
  error_log /var/log/mydomain.name.error.log error;

  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-Proto https;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_cache cache;
    proxy_cache_valid 15m;
    proxy_cache_valid 404 1m;
    proxy_no_cache $no_cache;
    proxy_cache_bypass $no_cache;
    proxy_cache_bypass $cookie_session $http_x_update;

    location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
      root /path/to/mydomain.name/public_html;
      access_log /var/log/mydomain.name.log combined;
      access_log /var/log/mydomain.name.bytes bytes;
      expires max;
      try_files $uri @fallback;
    }
  }
.....

```

**My nginx.ssl.conf**

```
server {
  listen my.ip.address:443;
  server_name mydomain.name;
  ssl on;
  ssl_certificate /path/to/ssl.mydomain.name.pem;
  ssl_certificate_key /path/to/ssl.mydomain.name.key;
  error_log /var/log/mydomain.name.error.log error;

  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-Proto https;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_cache cache;
    proxy_cache_valid 15m;
    proxy_cache_valid 404 1m;
    proxy_no_cache $no_cache;
    proxy_cache_bypass $no_cache;
    proxy_cache_bypass $cookie_session $http_x_update;

    location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
      root /path/to/mydomain.name/public_html;
      access_log /var/log/mydomain.name.log combined;
      access_log /var/log/mydomain.name.bytes bytes;
      expires max;
      try_files $uri @fallback;
    }
  }
....

```

---

_[View the full topic](https://meta.discourse.org/t/discourse-stopped-working-with-404-errors/106997)._
