workspaces-issues
workspaces-issues copied to clipboard
Issues using Apache as a HTTPS proxy: 403
Hello! I am trying to use Kasm behind an Apache HTTPD reverse proxy. When I try to connect to a workspace, it fails with 403 in the DevTools console. Can you help me? Here is my Apache config:
<VirtualHost *:443>
ServerName kasm.xxxxx.xxx
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLProxyEngine On
SSLProxyCheckPeerCN off
SSLProxyCheckPeerExpire off
RemoteIPHeader X-Forwarded-For
RemoteIPHeader X-Real-IP
Header set X-Forwarded-Proto https
RewriteEngine On
RewriteCond %{HTTP:CONNECTION} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) wss://localhost:4937/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) https://localhost:4937/$1 [P,L]
ProxyPassReverse / https://localhost:4937/
SSLCertificateFile /etc/letsencrypt/live/kasm.xxxxx.xxx/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/kasm.xxxxx.xxx/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
<VirtualHost *:80>
ServerName kasm.xxxxx.xxx
DocumentRoot /var/www/html/public_html
RewriteEngine on
RewriteCond %{SERVER_NAME} =kasm.xxxxx.xxx
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet