rejetto forum

Software => HTML & templates => HFS ~ HTTP File Server => RAWR-Designs => Topic started by: Novox on November 10, 2008, 03:43:57 PM

Title: RAWR-Player with Apache ProxyPass need help!
Post by: Novox on November 10, 2008, 03:43:57 PM
Hello Sir,

I have one issue about using RAWR-Player with Apache ProxyPass. I have installed the main web server (apache) on port 80. Then install HFS on port 88, after that ProxyPass HFS into port 80 as same as Apache by using VirtualHost.

This is my question. I have edit all .js .css for the latest Terayon release everything works perfectly except the RAWR-Player. The problem is the player is loaded but the file (MP3) isn't. If I browse directly from HFS port 88. The file was loaded successful and can it can run, so there is a way to change the file path on the player?

More info about host:
APACHE: localhost:80
HFS: localhost:88
HFS after ProxyPass: localhost:80/dl/

Please advice!
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: rejetto on November 10, 2008, 03:48:53 PM
i guess the wrong url is passed to the player...
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: rejetto on November 10, 2008, 04:48:06 PM
mmm, what's the url produced by %full-file-url% that is not working for you?
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: Novox on November 10, 2008, 05:31:32 PM
%full-file-url% is works but not works well for some reason. Because %full-file-url% will get the HFS IP and PORT before ProxyPass. It will get localhost:88 instead of localhost:80/dl/, so the PORT that doesn't official maybe blocked by some ISP or Firewall.
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: rejetto on November 10, 2008, 05:49:36 PM
when your browser requires the list to "localhost:80" (apache), this value is passed reported in the http header "host".
%item-full-url% is built by using the content of the http header "host".
so, maybe the proxy is changing this value.
can you please provide a dump of the request as received by HFS?
to do so, you must only do this
1. right click on the hfs log, and enable the "dump request"
2. request the list with your browser
3. report here the dumped request
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: Novox on November 11, 2008, 02:11:15 AM
Here is request dump for browse HFS through ProxyPass. Dump is same for both directly connect and ProxyPass

> GET /tkbcolo/VampireS%20644/001-NEW%20%5BS%5D%20-%20Ost.%20%E0%B9%83%E0%B8%88%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%A7/ HTTP/1.1
> Host: 127.0.0.1:88
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language: th,en-us;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: TIS-620,utf-8;q=0.7,*;q=0.7
> Referer: http://www.tkb-colo.com/dl/tkbcolo/VampireS%20644/
> Cookie: testcookie=enabled; SN_rabinn=0; ModuleTable=normal; Volume=100
> X-Forwarded-For: 58.9.4.84
> X-Forwarded-Host: www.tkb-colo.com
> X-Forwarded-Server: 127.0.0.1
> Connection: Keep-Alive
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: rejetto on November 11, 2008, 02:34:40 AM
Here is request dump for browse HFS through ProxyPass. Dump is same for both directly connect and ProxyPass

The same?
The direct connection should not contain all those x-forwarded fields.
They are added by the proxy.

Anyway, this is a dump of the proxy for sure, because those fields are present, and the "host" is 127.0.0.1:88
The browser used a different value for sure. This means the proxy is changing that value before reissuing the request.

I guess the solution is to just use the X-forwarded-host in place of host, when available.
I'll make this way in next build, so, if you'll want to give a try... ;)
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: Novox on November 11, 2008, 03:19:26 AM
Thank you very much! I will try it.  ;D
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: Unknown8063 on November 22, 2008, 07:32:08 AM
I've been using reverse proxy to access my HFS server for some time now.  Novox, are you specifying the

ProxyPreserveHost On

directive in your config file for the virtual host?
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: Novox on November 22, 2008, 09:07:28 AM
No, only simple statement "ProxyPass /dl http://localhost:1020"

Should I need "ProxyPreserveHost On"??
Title: Re: RAWR-Player with Apache ProxyPass need help!
Post by: rejetto on November 22, 2008, 12:30:04 PM
in the while, the "next build" was published