When publishing a nextcloud website using a nginx reverse proxy, you might get an error shown on Apple iOS iPhone and iPadOS iPads on all browsers - e.g. Safari or Chrome: ERR_CONNECTION_CLOSED
Solution
Add in the nginx reverse proxy configuration the following line:
proxy_hide_header Upgrade;
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header
By default, nginx does not pass the header fields “Date”, “Server”, “X-Pad”, and “X-Accel-...” from the response of a proxied server to a client. The
proxy_hide_header
directive sets additional fields that will not be passed. If, on the contrary, the passing of fields needs to be permitted, the proxy_pass_header directive can be used.
Syntax: proxy_hide_header
field
;
Default: — Context: http
,server
,location
|
Nginx GUI configuration:
- Login to your Nginx Proxy Manager.
- Open the 3 dots settings menu of the NextCloud host and select “Edit”
- In
the tab menu at the top of the window that has just opened select
“Advanced” and insert the following in the “Custom Nginx Configuration”
box:
proxy_hide_header Upgrade;
- Click "save".