Nginx won't serve css and js anymore

Nextcloud version: 12.0.2
Operating system and version: Armbian / Deiban 9 \w sunxi 4.14.15 kernel
Apache or nginx version: 1.10.3
PHP version: 7.0.27

The issue you are facing:
Kind of the same as described here:
-> Broken login screen, login button not working. Nginx isn’t providing any CSS or JS files.
Error in browser console: Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR

My installation worked a long time like charm, but a few days ago the root (/) filesystem on the SD card in my Bananapi 2 reached 100% and I didn’t recognize it soon enough. After replacing it with a bigger one, resizing it etc. Nextcloud didn’t even start. First this was due to the MariaDB service couldn’t start. Deleting /var/lib/mysql/tc.log resolved that. Nextcloud is now starting again and all client applications seem to work properly. The only thing still broken is the webinterface. From what I’ve read this has to be because of a misconfigured nginx configuration. However, I didn’t touch the nginx config file at all. I’ve compared it with the recommended one and for me it looks ok.

So now my question: Can anyone give me a hint where to look? Logfiles do not even report any errors, deleting the “instanceid” line in config.php did not work, already tried to clear the browser cache / use different browsers. I tried now for several hours without any success.

Is there maybe any more file like the tc.log for MariaDB that may became corrupted on the old SD card?

Since the Nextcloud logs do not report any issues I spare to post them.

In case you want to try yourself, the URL is .

Thanks a lot for your help!

There were a few theming issues in early NC 12 versions, I would try the latest 12.0.5.

And perhaps try without the SPDY protocol, perhaps there is something broken…

Looks like you are using SPDY which is a predecessor of http2. http2 is supported by nginx since version 1.9.5. So I suggest switching to http2 which is also enabled in the nginx example configurations for Nextcloud 12:

You say you compared your nginx configuration with the recommended one. Do you mind posting it anyway?

I tried to access and test your site a little bit, but after 3 requests for I am locked out: connection refused…

Hi there, thanks a lot for your comments. @Bernie_O Sorry about the time outs, I was just testing stuff.

So it seems to work again. :sunny:

What I did:
a) Manually upgrade to 12.0.5 - did not solve the problem
b) Had a detailed look again at my nginx config file and found the two lines with strict-transport-security headers
# add_header Strict-Transport-Security “max-age=15768000; includeSubDomains; preload;”;
# add_header Strict-Transport-Security "max-age=15768000;
to be slightly different to mine and additionally commented out. So I also commented both lines in the nginx config, restarted nginx --> login page works again.
Logging into the admin account, Nextcloud is complaining about missing STS headers. Uncommenting both lines and restarting nginx again --> everything still seems to work.

To be honest, I don’t really get how that STS header stuff works, I just followed the security recommendations in this point.

I hope this also helps others and sorry for bothering you guys :slight_smile:

1 Like