chronodiagram/diagramming-apache-site.example.conf

27 lines
748 B
Text
Raw Normal View History

2022-09-12 09:23:05 +00:00
<VirtualHost *:80>
# This is the HTTP example, ideally use Certbot/LetsEncrypt to encrypt the data transferred
Servername diagramming.WEBSITE
<Location />
# Optionally use some basic auth to prevent access to anyone.
AuthType Basic
Authname "Password Required"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Location>
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:7890/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://localhost:7890/$1 [P,L]
ProxyPass / http://localhost:7890/
ProxyPassReverse / http://localhost:7890/
ProxyPreserveHost On
</VirtualHost>