From 104e36d36c086c4c6567e683d528188cdbda3365 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Fri, 26 Feb 2021 10:27:18 -0300 Subject: [PATCH] Create apache_copypasta.txt --- apache_copypasta.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 apache_copypasta.txt diff --git a/apache_copypasta.txt b/apache_copypasta.txt new file mode 100644 index 0000000..25d9aaf --- /dev/null +++ b/apache_copypasta.txt @@ -0,0 +1,13 @@ +sudo apt install apache2 python3-certbot-apache +sudo a2enmod rewrite ssl proxy_http proxy_connect proxy_wstunnel + +# 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 +RewriteEngine On +RewriteCond %{HTTP:Upgrade} =websocket [NC] +RewriteRule /viaaas/(.*) wss://localhost:25543/$1 [P,L] +RewriteCond %{HTTP:Upgrade} !=websocket [NC] +RewriteRule /viaaas/(.*) https://localhost:25543/$1 [P,L]