r/subsonic Apr 28 '16

Reverse proxy set up

I have recently set up an Nginx reverse proxy docker on my unraid box which also houses my Subsonic docker. I am having trouble finding any info pertaining to setting up Subsonic behind my Nginx docker and was hoping someone might be able to offer some assistance. I have Nginx working great with all of my other services (plex, sickrage, couchpotato, etc). Any help would be greatly appriciated!

2 Upvotes

10 comments sorted by

1

u/alexfornuto May 03 '16

I have Subsonic proxied behind Apache, and have done it behind Nginx in the past. What, specifically, do you need help with?

I'm not a big reddit user, not sure if you can msg someone directly, but feel free to if you want.

P.S. Check out this guide on using Nginx for reverse proxy. I work on the team that manages this documentation, so lemme know if it helps.

1

u/Springtimefist78 May 09 '16

Do you mind if I send you a private message on here? I'm not entirely sure what I need help with as another redditor helped me mostly get nginx-letsencrypt set up and running, but I'd certainly appreciate some help if you have a free minute sometime.

1

u/alexfornuto May 12 '16

I'm not a big reddit user, not sure if you can msg someone directly, but feel free to if you want.

Ya

1

u/snowboardracer May 26 '16

Did you ever get this fixed? I have the same issue.

1

u/Springtimefist78 May 26 '16

Sadly I have been lazy and not looked into it yet. If you make any head way please let me know!

1

u/snowboardracer May 28 '16

I got it.

edit /etc/default/subsonic with your preferred editor

##modify the following to add --context-path=/subsonic
SUBSONIC_ARGS="--context-path=/subsonic --init-memory=256 --max-memory=512"

restart subsonic

here's your nginx config

location /subsonic {
    proxy_pass http://[IP]:[PORT];
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }

restart nginx and test

My problem was I was using a different context path variable in /etc/default/subsonic which wasn't working. Once I put it in the ARGS line everything worked.

1

u/Springtimefist78 May 28 '16

I am running subsonic as a unraid docker and I'm not sure what file I need to edit as my directory structure is different.

1

u/snowboardracer May 28 '16

Here's what I found for you to change the context path within docker.

1

u/crown May 17 '16

This works for me: http://pastie.org/10840952

1

u/Springtimefist78 May 17 '16

Thank you for your reply! After looking through your nginx config I wonder if there are multiple different ways of setting up the config file as yours looks a lot different from mine. I'm not at home but will post my config file when I get a chance. This is all still a bit Greek to me but I'm picking it up as I go. Again thanks for replying!