FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › Add-on Software › Proxying mt-daapd via apache
- This topic has 2 replies, 2 voices, and was last updated 15 years, 8 months ago by w1ll14m.
-
AuthorPosts
-
25/04/2008 at 9:17 PM #2407w1ll14mParticipant
Ok, i’d like to contribute one of my tricks, i don’t know if someone else uses this allready but i’d like to share it anyway π
Ok, so you have mt-daapd running nicely in an internal network.
So now you can use Firefly Client internaly (java client by Vincent Cariven) and externaly (if you route firefly port to wan ip).As daap/RSP are both http based, this allows you to do some nice tricks:
Like Proxying daap/rsp trough apache2, which allows you to bypass any proxy which allows port 80 (always enabled because of http transfers :))Also Fireplay works nicely with this.
So what you need:
Apache2 (with proxy, rewrite support and preferably name based vhosts)An example apache vhost:
ServerName daap.domain.com
DocumentRoot "/path/to/wwwroot/" # contains the fireplay (rename fireplay.html to index.html)
RewriteEngine On
RewriteRule ^/rsp/(.*)$ http://127.0.0.1:8080/rsp/$1 [P]
RewriteRule ^/login(.*)$ http://127.0.0.1:8080/login$1 [P]
RewriteRule ^/server-status(.*)$ http://127.0.0.1:8080/server-status$1 [P]
RewriteRule ^/databases/(.*)$ http://127.0.0.1:8080/databases/$1 [P]
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
This allows you to proxy DAAP/RSP trough apache2, so you can use Fireplay or Firefly client from almost any computer.
Since they they are proxied from apache2 they can also pass proxy’s π
You can even host a php page that communicates via songs3.db and create your own player.I created a simple php daap browser, which enables me to stream video from daap using batch script and mplayer!
Well, if there’s any interest in my php browser… it’s a modified version of ph_pexplorer and it’s a little crappy coded (haven’t had much time to get it perfect), but i’m willing to share it.
–edit–
Note that i use port 8080 for mt-daapd on localhost.03/02/2009 at 12:24 PM #16915AnonymousInactiveHi!
I have been trying to get this to work, but no luck. Apache won’t run again until I re-comment the vhosts option in httpd.conf. The vhosts seem to be set up right, the first one points to my original document root and the second one is the one you posted, except the port is 80 instead of 8080.
I have scoured the internet for the answer to this question (it is something I am really interested in doing), as well as seen other people ask the question, but have never seen much coverage of it. Anything you can give me might help.
Thanks
P.S. I also have a post about accessing Firefly externally, to do which you said I need to route the Firefly port to the WAN IP. It is currently routed to the server’s static internal IP, and my Linksys router won’t let me route it to an external IP. Any thoughts on that (though I’m sure if I can get this apache thing working external access will be possible) would be appreciated.
Thanks again!
26/03/2009 at 9:59 PM #16916w1ll14mParticipanti think you should take a better look at virtual hosting in apache.
Also localhost:8080 is my firefly (i changed default ports)
you need to defineListen 80
NameVirtualHost *:80
Before your sectionYou also need the right modules enabled
vhost
mod_proxy and it’s sub modulesAlso show me the failure you get when starting apache2 π
I will soon het a demo online of my daap frontend which might be of interest to some of us πPS
I use apache as my getaway to mt-daapd
that is why the virtual host is used π -
AuthorPosts
- The forum ‘Add-on Software’ is closed to new topics and replies.