From 0f78c4b2a3a85cc0d47ca5adc6cc43d026055e20 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 27 Mar 2022 17:27:03 -0400 Subject: [PATCH] Add apache2.conf.example for rev proxy --- config_examples/apache2.conf.example | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 config_examples/apache2.conf.example diff --git a/config_examples/apache2.conf.example b/config_examples/apache2.conf.example new file mode 100755 index 00000000..d5eeb49e --- /dev/null +++ b/config_examples/apache2.conf.example @@ -0,0 +1,36 @@ + + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + RewriteEngine on + RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + + + + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + ProxyPreserveHost On + SSLProxyEngine On + SSLProxyVerify none + SSLProxyCheckPeerCN off + SSLProxyCheckPeerName off + SSLProxyCheckPeerExpire off + +#This is important for web sockets which are required by crafty to run! + + RewriteEngine on + RewriteCond %{HTTP:Upgrade} websocket [NC] + RewriteCond %{HTTP:Connection} upgrade [NC] + RewriteRule .* "wss://127.0.0.1:8443%{REQUEST_URI}" [P] + + SSLCertificateFile /var/opt/minecraft/crafty-commander/app/config/web/certs/commander.cert.pem + + SSLCertificateKeyFile /var/opt/minecraft/crafty-commander/app/config/web/certs/commander.key.pem + + ProxyPass / https://127.0.0.1:8443/ + ProxyPassReverse / https://127.0.0.1:8443/ + ProxyRequests off +