CleanURL
From SqueezeboxWiki
NOTE: exposing your Logitech Music Server to the internet is a bad idea. This page is left here for reference. But we strongly suggest you don't do this. Use a VPN if you want to access your music from the outside.
Contents |
Accessing SlimServer without the :9000 using Apache Reverse Proxy
These instructions are on how to set up your webserver to have SlimServer accessible from an address (URL) like http://www.yourserver.org/slimserver/ instead of http://www.yoursever.org:9000. This is useful if you don't like having to add the :9000 (admittedly, not a big deal), or if you want to be able to access SlimServer from somewhere that will not work if you try to specify a port like :9000 (this is a big deal - from such a location, you couldn't otherwise access Slimserver).
These instructions are specifically for recent (January 2008) Debian or derived distribution (Ubuntu, Knoppix, Mepis, etc.). Hopefully the information will be relatively easy to modify for other systems.
These instructions assume you already have Apache2 and SlimServer installed and running. The technical name for this is a 'reverse proxy'.
Debian - Apache Reverse Proxy
1. Install the following additional package; this is not standard in most Debian distros, and is needed for this to work:
root@server # apt-get update root@server # apt-get install libapache2-mod-proxy-html
This installs the Apache2 proxy_html module package.
2. Now you need to enable a few Apache2 modules:
proxy proxy_http proxy_htmlheaders
They are not enabled by default in Debian, but can be enabled by running the command a2enmod followed by the module name, i.e., run the following three commands:
root@server # a2enmod proxy root@server # a2enmod proxy_html root@server # a2enmod proxy_http root@server # a2enmod headers
3. Create a file called /etc/apache2/sites-available/slimserver containing the following text:
# Slimserver Reverse Proxy Configuration # Prepared by BV January 2008 # # Make sure that the server cannot # be abused ProxyRequests Off # The Proxy section below allows internet users # to access the internal server ProxyPass /slimserver/ http://localhost:9000/ ProxyHTMLURLMap http://localhost:9000 /slimserver <Location /slimserver/> Order allow,deny Allow from all ProxyPassReverse / SetOutputFilter proxy-html ProxyHTMLURLMap / /slimserver/ ProxyHTMLURLMap /slimserver /slimserver RequestHeader unset Accept-Encoding </Location>
4. Enable the above configuration:
root@server # a2ensite slimserver
5. Restart Apache2:
root@server # /etc/init.d/apache2 restart
6. You should now be able to access the SlimServer interface from http://www.yourserver.org/slimserver/
Note the trailing slash! At present, this has to be there.
Issues
There may be some outstanding issues; contributions/solutions welcome.
Trailing Slash
This is something that is usually dealt with by Apache using the mod_rewrite module; though enabled on my server, it doesn't work for the above. There is probably a fairly straightforward solution to make it apply to this configuration as well.
Album Covers
Album covers don't display in those SlimServer skins that support covers (Fishbone, Nokia770). I noticed that removing certain of the trailing slashes in the above configuration would mean that some of the icons would not display, not sure what that means with respect to the covers (which, in my case, are in the id3v2 tags).
SoftSqueeze
SoftSqueeze doesn't work for me remotely under the above configuration. I am able to play a remote stream using a media player like Zinf on Windows, but haven't yet got SoftSqueeze to work.