Reverse Proxy Subsonic

Hello.

I have had success setting up reverse proxy’s for guacamole and Ombi and I was wanting to get one set up for Subsonic.

My current config looks like this - very basic.

mydomain.com {
gzip
proxy / 192.168.1.226:4040 {
       }
}

I have tried several different iterations of the file with no real success.

I am able to type the url in my local brower and it pulls the site up, however it displays the local ip address instead of the URL and HTTPS like it does with guac and ombi.

Any help is greatly appreciated. Thank you.

Hi @Grizzle33, welcome to the Caddy community.

The fact that your browser is displaying the IP address after you navigate to mydomain.com is interesting. Perhaps subsonic is redirecting canonically?

Is the site otherwise functional, apart from the URL showing the IP?

Could you post the output of curl -iL mydomain.com (substituting your real domain, of course).

Here’s the output from curl. After this display, it shows all the HTML of the site.

HTTP/1.1 301 Moved Permanently
Connection: close
Location: https://music.domain.com/
Server: Caddy
Date: Thu, 18 Jan 2018 17:13:18 GMT
Content-Length: 63
Content-Type: text/html; charset=utf-8

HTTP/1.1 302 Found
Content-Length: 0
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Location: http://192.168.1.226:4040/login.view;jsessionid=nyuwu1yyib9i?
Server: Caddy
Server: Jetty(6.1.x)
Set-Cookie: JSESSIONID=nyuwu1yyib9i;Path=/
Date: Thu, 18 Jan 2018 17:13:18 GMT
Content-Type: text/plain; charset=utf-8

HTTP/1.1 200 OK
Content-Language: en
Content-Type: text/html; charset=utf-8
Content-Length: 5795
Server: Jetty(6.1.x)

For the record - i’m a total rookie. I’m sure the answer is glaring at me.

1 Like

Must be issuing its session redirect using the Host header rather than a relative link?

Try

proxy / 192.168.1.226:4040 {
  transparent
}

which will forward the Host (music.domain.com?) to the Jetty server, hopefully it picks up on that.

Thank you this worked perfectly!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.