mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add apache2.conf.example for rev proxy
This commit is contained in:
parent
c93824de7c
commit
0f78c4b2a3
36
config_examples/apache2.conf.example
Executable file
36
config_examples/apache2.conf.example
Executable file
@ -0,0 +1,36 @@
|
||||
<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>
|
Loading…
Reference in New Issue
Block a user