Fix for Safari/iOS error NSPOSIXErrorDomain:100

Hello everyone,

I have been running HestiaCP v1.3.2 on Debian 10.6 and nginx is configured in front of apache as a reverse proxy.

Unfortunately, using Safari browser on Mac or iOS devices to access https sites, doesn’t open sites hosted on HestiaCP and displays an error NSPOSIXErrorDomain:100.

This problem is described in many other sites and control panels, e.g. https://trac.nginx.org/nginx/ticket/2078 and the fix they recommend works (proxy_hide_header Upgrade).

Here is a quick script I hacked to enable this in all sites hosted on my Hestia installation.

root@potato:~# cat bin/v-fix-web-domains
#!/bin/bash
# deploy fix for safari browser problem accessing https sites

USERS="$(v-list-users plain | awk '{print $1}')"
for u in ${USERS}; do
        DOMAINS="$(v-list-web-domains ${u} plain | awk '{print $1}')"
        for d in ${DOMAINS}; do
                source /usr/local/hestia/data/users/${u}/web.conf

                if [ "$SSL" == "yes" ]; then
                        echo "proxy_hide_header Upgrade;" > /home/${u}/conf/web/${d}/nginx.ssl.conf_safarifix
                fi
        done
done

nginx -t && systemctl reload nginx

Is there a hook I could use to deploy automatically this nginx snippet when I add a new web domain instead of having to manually run this hacky script every time I add something ?

Thanks,
Sot.

3 Likes

I have seen the issues mainly when “creating” a video player and wasn’t able to pin point the cause…

I think it might be worth adding it in the templates by default.

If possible please create an pull request via:

You will need to modify the following templates:

Thank you very much @eris!

Here is a pull request for the templates you mentioned

1 Like

Plz remove proxy_hide_header Upgrade by default, this is wast my time about 8 hours, like him:

So it breaking a ton of OSX/IOS users or waisting 2 users time who are use websockets?

I pick the last option