I fixed the 500 error by enabling proxy_wstunnel.
I fixed the double loading by adding this to my apache config:
RequestHeader unset If-Modified-Since
RequestHeader unset If-None-Match
From here: https://github.com/mattermost/platform/issues/1812#issuecomment-176397612