Unable to setup Subsonic API

413 views
Skip to first unread message

albertoca...@gmail.com

unread,
Jan 5, 2017, 4:34:45 PM1/5/17
to Ampache
Hello

I have been using Ampache 3.8.2 for a few weeks now and I am quite happy with it. However the clients that are available to Android don't seem to be very updated at all. The most recent ones I found were Power Ampache (which is the one I use) and Just Player, which has been last updated on March 2015 and has a Pro version too.

I would like to be able to use the Subsonic API to I can use Subsonic clients.

As of now I am hosting Ampache using Lighttpd on a Raspberry Pi 2

Ampache files reside on "/var/www/html/" so it's on the root of the webserver.

Then I followed this as best as I could with no success:


Note: Default configuration assumes your Ampache installation resides at the root of your webserver. If you are serving it from a subfolder (say /ampache/), you should:

  • Set
web_path = "/ampache"
;local_web_path = "" 

I didn't do anything here as it's just on root

Then on here Edit the .htaccess file accordingly, e.g. replacing /play/ by /ampache/play.

I didn't find any .htaccess file on the root, so I just renamed rest/.htaccess.dist to .htaccess and didn't do anything else

Then here:

For others:

  • You have to adapt /rest/.htaccess script for your web server if you're not using Apache or Nginx
  • For lighttpd following lines need to be added:
url.rewrite-once = (
  "^/rest/(([^\?]+)\.view)(\?(.*))?" => "/rest/index.php?ssaction=$2&$4"
)

I renamed /rest/.htaccess.dist to .htaccess but I didn't do anything else as mentioned earlier. Then I added the url.rewrite-once config to lighttpd.conf

Subsonic backend s enabled on Admin/System for all users

When I try to type in my host/rest/ping.view I get a 404 not found error instead of the XML response.

What am I doing wrong?

Thanks 

albertoca...@gmail.com

unread,
Jan 6, 2017, 4:57:27 PM1/6/17
to Ampache
Ok

I am an idiot :)
Read the lighttpd log and saw that url.rewrite-once was ignored by my server. I didn't understand it as I thought the module was loaded on lighttpd.conf, and I looked at it several times... until I noticed it was commended out.

Removed the comment from the line and reloaded the config. The XML message shows up now.

Thanks
Reply all
Reply to author
Forward
0 new messages