| 1 |
# qwd cgi configuration for perl |
| 2 |
|
| 3 |
LoadModule perl_module modules/mod_perl.so |
| 4 |
LoadModule cgi_module modules/mod_cgi.so |
| 5 |
LoadModule proxy_module modules/mod_proxy.so |
| 6 |
LoadModule proxy_http_module modules/mod_proxy_http.so |
| 7 |
LoadModule rewrite_module modules/mod_rewrite.so |
| 8 |
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so |
| 9 |
|
| 10 |
<Location /cgi-bin/qemu-web-desktop.pl> |
| 11 |
SetHandler perl-script |
| 12 |
PerlResponseHandler ModPerl::Registry |
| 13 |
PerlOptions +ParseHeaders |
| 14 |
AddHandler perl-script .pl |
| 15 |
AddHandler perl-script .cgi |
| 16 |
Options +ExecCGI |
| 17 |
<IfModule mpm_itk_module> |
| 18 |
AssignUserIDExpr _qemu-web-desktop |
| 19 |
AssignGroupIDExpr kvm |
| 20 |
</IfModule> |
| 21 |
</Location> |
| 22 |
|
| 23 |
Alias /qemu-web-desktop /usr/share/qemu-web-desktop/html/desktop |
| 24 |
<Directory /usr/share/qemu-web-desktop/html/desktop> |
| 25 |
Options +Includes |
| 26 |
AddOutputFilter INCLUDES .html |
| 27 |
</Directory> |
| 28 |
|
| 29 |
# ------------------------------------------------------------------------------ |
| 30 |
# Redirect QWD port to /darts/ |
| 31 |
# |
| 32 |
# If you change the reverse proxy settings, adapt: |
| 33 |
# $config{service_port} = 6080; # must match 6080 below. |
| 34 |
# $config{service_port_multiple} = 0; |
| 35 |
# $config{service_reverse_proxy} = "/darts"; # must match '/darts' below. |
| 36 |
# |
| 37 |
# Then execute: |
| 38 |
# sudo a2enmod proxy proxy_http proxy_wstunnel rewrite |
| 39 |
# sudo systemctl restart apache2 |
| 40 |
# |
| 41 |
# Applied globally to all <VirtualHost> |
| 42 |
RewriteEngine On |
| 43 |
RewriteCond %{HTTP:Upgrade} =websocket [NC] |
| 44 |
RewriteRule /darts wss://127.0.0.1:6080/ [P,L] |
| 45 |
|
| 46 |
ProxyPass /darts ws://127.0.0.1:6080/ |
| 47 |
ProxyPassReverse /darts ws://127.0.0.1:6080/ |
| 48 |
|
| 49 |
|