Skip to content

Installing the Subsonic media server via apache on a Netgear ReadyNas Pro

I’ll admit it, I’m a geek. When geeks save $$$ for awhile, we get toys with 12Tb of raw disk space. Now this purchase wasn’t taken lightly. I did some research and chose the  ReadyNas Pro 6 disk for a few reasons.

  1. It runs Debian 4.0 (Etch) x86_64. In the past, I’ve used Ubuntu as a ‘nix workstation and am quite familar with Debianisms.
  2. It has an Intel Atom dual core processor instead of some of the lower end Mips or ARM processor. It is easier to get software to work on it as a standard x86 Linux install.
  3. Netgear not only allows, but actively encourages modding and tinkering with it. The ReadyNAS Forums are pretty top notch and “Yohdah“, their support guru, is very helpful.
  4. It has some pretty decent plugins and community plugins that make a lot of things you’d want to hack on dead simple. It is only a few clicks to install the root ssh plugin, yay!

After finding the Subsonic plugin, and the fantastic Subsonic web media server, I installed the plugin. It defaults to listening on port 4040 so you have to go to http / https://readynas:4040 to listen to your tunes. Knowing it could be better, I started poking around the readynas apache configuration and realized that it had mod_proxy installed.

Aha! I’ll just use my standard Debian apache configuration know how and all will be well. Nope… They put the apache configuration under /etc/frontview/apache and their “conf.d” directory is: /etc/frontview/apache/addons. Under the addons directory there was already a SUBSONIC.conf, but further plugin upgrades would overwrite that. I created /etc/frontview/apache/addons/subsonic_proxy.conf that looks ultimately like this:

readynas:/etc/frontview/apache/addons# cat subsonic_proxy.conf
# Serve Subsonic via apache under /subsonic/
LoadModule proxy_module      /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so 

ProxyRequests     Off
ProxyPreserveHost On

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass        /subsonic/ http://localhost:4040/subsonic/
ProxyPassReverse /subsonic/ http://localhost:4040/subsonic/

<Location /subsonic>
Allow from all
</Location>

 

Next up was figuring out the proper way to restart apache. Since they use the non-standard configuration file, the normal apachectl configtest fails:

 

 

 

readynas:/etc/frontview/apache/addons# apache2ctl configtest
apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory

This was easy enough by changing into /etc/apache2 and running: ln -s ../frontview/apache/httpd.conf apache2.conf. Now commands like this work perfectly:


readynas:# apache2ctl configtest && apache2ctl stop && apache2ctl start

To finish up the configuration, edit /c/webroot/subsonic/subsonic.sh and change SUBSONIC_CONTEXT_PATH= to SUBSONIC_CONTEXT_PATH=/subsonic. Now just kill the existing java process and run ./subsonic.sh for it to start everything up.

Then you just browse to http://readynas/subsonic/ (notice the trailing slash) and you're doneski.

 

 

 

 

 

 

Categories: Open Source.

Tags: , , , ,

Comment Feed

No Responses (yet)



Some HTML is OK

or, reply to this post via trackback.