2021-04-14 00:25:52 +02:00
|
|
|
# command to installing apache + certbot
|
2021-02-26 14:27:18 +01:00
|
|
|
sudo apt install apache2 python3-certbot-apache
|
2021-04-14 00:25:52 +02:00
|
|
|
# generate the let's encrypt certificate with certbot
|
|
|
|
|
|
|
|
# enable some needed modules
|
2021-02-26 14:27:18 +01:00
|
|
|
sudo a2enmod rewrite ssl proxy_http proxy_connect proxy_wstunnel
|
|
|
|
|
2021-04-14 00:25:52 +02:00
|
|
|
# this is a example configuration for using in VirtualHost of Apache config
|
2021-02-26 14:27:18 +01:00
|
|
|
# https://stackoverflow.com/questions/19294816/is-it-possible-to-ignore-an-apache-proxyd-certificate
|
|
|
|
# https://stackoverflow.com/questions/27526281/websockets-and-apache-proxy-how-to-configure-mod-proxy-wstunnel
|
|
|
|
SSLProxyEngine on
|
|
|
|
SSLProxyCheckPeerCN off
|
|
|
|
SSLProxyCheckPeerExpire off
|
2021-04-29 19:14:36 +02:00
|
|
|
ProxyPreserveHost on
|
|
|
|
RewriteEngine on
|
2021-02-26 14:27:18 +01:00
|
|
|
RewriteCond %{HTTP:Upgrade} =websocket [NC]
|
2021-03-06 22:58:50 +01:00
|
|
|
RewriteRule ^/viaaas/(.*) wss://localhost:25543/$1 [P,L]
|
2021-02-26 14:27:18 +01:00
|
|
|
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
|
2021-03-06 22:58:50 +01:00
|
|
|
RewriteRule ^/viaaas/(.*) https://localhost:25543/$1 [P,L]
|