I setup a proxy pass to have the app on one server and the hostname terminate by DNS on another machine.
Setting up a reverse proxy is pretty easy:
location /directory/ {
proxy_pass https://192.168.1.1/;
proxy_set_header Host example.org;
proxy_hide_header Upgrade; # Important part for Safari
}
But for some reason, Safari doesn’t like the response.
The important part is to NOT pass the Upgrade header on to the backend machine – don’t ask me, what is wrong with Safari, because without the configuration it still works with curl, Chrome and Paw