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.