The sollution hypnotoad posted is the one I used before. And it works great!
But...
The problems arise (my current problems) when one wants to use https on the apache-server on the standard port (443) while still having access to the Vibe Stream-server. Yes, you can use different virtual hosts and it works... nearly. Except from that since you can only have one certificate shared by all virtual hosts, the certificate with
www.domain.com gets invalid for vibe.domain.com and clients haveto discard the invalid certificate in their browsers.
The sollution would be having vibe below
www.domain.com/<prefix>/ and proxypassed from there. Ex
www.domain.com/vibe/. Leaving all other locations to the webserver. Still passing
www.domain.com/forum and other urls to their ordinary places.
As far as I have come is with the prefix (my case /v) and also rewriting the /ajax /share and other prefixes to corresponding /v/ajax, /v/share and such...
Some problems i have encountered
- Session cannot be loaded (due to following problems).
- Ajax calls doesn't get rewritten with the prefix (workaround is rewrite of /ajax to /v/ajax).
- Ajax responses gets wrapped in html (proxyhtml filter problem).
Problems still left
- Flashplayer cannot start songs (Failed to load song...) when the filepath contains a + char (plus). Everywhere else it gets urlencoded before passed. I don't know where this request gets rewritten. It seems to me to be the request from the flashplayer that is wrongfully rewritten in apache.
My current apacheconfig (with ugly workarounds) also available at
https//www.sys.nu/linux/vibestreamer/mods
[code1j039pd6]
<VirtualHost *:443>
SSLEngine on
SSLProxyEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLCertificateKeyFile /etc/apache2/ssl/apache.pem
ServerAdmin webmaster@sys.nu
# REWRITES
RewriteEngine On
RewriteCond %{REQUEST_URI} /v/
RewriteRule /v/(.*) http://172.16.1.21:8081/$1 [P,L]
RewriteCond %{REQUEST_URI} /auth/
RewriteRule /(.*) http://172.16.1.21:8081/$1 [P,L]
RewriteCond %{REQUEST_URI} /share/
RewriteRule /(.*) http://172.16.1.21:8081/$1 [P,L]
# PROXY PASSES
<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPreserveHost On
# RewriteLog "/tmp/rewrites.log"
# RewriteLogLevel 3
<Directory proxy:*>
order allow,deny
allow from all
</Directory>
<Location /v/>
ProxyPassReverse /
ProxyHTMLExtended on
ProxyHTMLURLMap / /v/ cei
ProxyHTMLURLMap ajax v/ajax
ProxyHTMLURLMap share v/share
ProxyHTMLURLMap addons v/addons
ProxyHTMLURLMap auth v/auth
</Location>
</IfModule>
[/code1j039pd6]