- I did not want to expose to the internet, so I had to find a way around this.
- Would be useless, as my employer won't let me out of the intranet on other than on port 80 or 443
So I've installed the Apache::ReverseProxy module from CPAN, and hacked on it a little bit in order to make it fit my needs. I've replaced the part where it sets the content-type header in the answer from the proxy back to the client with a check on undefined or empty content-type, and setting the default content-type to 'text/html'. Below are my changes to the file (+ = added, - = deleted from source):
- $r->content_type($response->header('Content-type'));
+ my $content_type = $response->header('Content-type');
+ if (! defined $content_type || length($content_type) == 0) {
+ $content_type = 'text/html';
+ }
+ $r->content_type($content_type);
With these changes, I could add a virtual host configuration for my new "TV" URL:
-- VirtualHost *:80
ServerName my.tv.recordings.url
-- Location /
SetHandler perl-script
PerlHandler Apache::ReverseProxy
PerlSetVar ReverseProxyConfig /etc/httpd/rproxy.conf
-- /Location
RedirectMatch ^/$ /eyetv
-- /VirtualHost
Finally, I added a file named rproxy.conf in /etc/httpd with the following content:
/ http://machine.with.eyetv.server:2170/
Of course, if you haven't already done so, you have to enable mod_perl in /etc/httpd/httpd.conf by uncommenting the corresponding AddModule and LoadModule directives. Now restart Apache and there you go! Note: Funnily enough, this does not work with Safari, but only with Firefox. [Elgato: please fix the HTML generated by the EyeTV media server!]
[robg adds: I haven't tested this one, and it assumes a certain level of knowledge about CPAN and working with httpd configuration files.]

