Merge branch 'feature/apache2-default-wss' into 'dev'

Feature/apache2 default wss

See merge request crafty-controller/crafty-commander!230
This commit is contained in:
Iain Powrie 2022-03-31 08:24:16 +00:00
commit f253f33f87
2 changed files with 46 additions and 2 deletions

View File

@ -24,14 +24,14 @@
</div>
<!-- Page Title Header Ends-->
{% include "parts/details_stats.html %}
{% include "parts/details_stats.html" %}
<div class="row">
<div class="col-sm-12 grid-margin">
<div class="card">
<div class="card-body pt-0">
{% include "parts/server_controls_list.html %}
{% include "parts/server_controls_list.html" %}
<div class="row">
<div class="col-md-12 col-sm-12" style="overflow-x:auto;">

View File

@ -0,0 +1,44 @@
#Base config made by Justman10000 and Zedifus (https://gitlab.com/Zedifus)
#Adapted for WSS by Andrew McManus https://gitlab.com/amcmanu3
#For this config you need to add the following mods
#mod_ssl
#mod_rewrite
#mod_http_upgrade
#mod_wss
<VirtualHost _default_:80>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</VirtualHost>
<VirtualHost _default_:443>
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
</VirtualHost>