p5.js-web-editor/digitalplayground-apache.conf

26 lines
1.0 KiB
Plaintext

# Forward to IPv6-only host
<VirtualHost *:80>
Servername dp.rubenvandeven.com
RewriteEngine On
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
Servername dp.rubenvandeven.com
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://digitalplayground.rubenvandeven.com:8000/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://digitalplayground.rubenvandeven.com:8000/$1 [P,L]
ProxyPass / http://digitalplayground.rubenvandeven.com:8000/
ProxyPassReverse / http://digitalplayground.rubenvandeven.com:8000/
ProxyPreserveHost On
SSLCertificateFile /etc/letsencrypt/live/dp.rubenvandeven.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/dp.rubenvandeven.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>