How to use HTTP authentication

Need help? Post your questions here.

Moderator: moderators

How to use HTTP authentication

Postby pchander » Tue Sep 25, 2012 7:38 pm

Version: 4.7 (build 3105) – September 11, 2012
Server: jetty-6.1.x, java 1.6.0_24, Linux (62.5 MB / 87.3 MB)
I am running Ubuntu 12.04.1.

I have nginx set up as a proxy to subsonic so I don't have to deal with port numbers. I wanted to also set up HTTP auth through nginx but am having difficulty getting it working.

I have basic auth working on the nginx side, but when I use it with subsonic I'm prompted with a second 'Authentication Required' box with 'Subsonic' as the realm. If I cancel this second box I see the following:
Code: Select all
HTTP ERROR: 401

LDAP authentication disabled.
RequestURI=/music/

Powered by Jetty://


My nginx configuration is as follows:
Code: Select all
location /music/ {
  auth_basic              "Music";
  proxy_pass              localhost:4040;
  proxy_set_header        Host            $host;
  proxy_set_header        X-Real-IP       $remote_addr;
}
pchander
 
Posts: 2
Joined: Tue Sep 25, 2012 7:20 pm

Re: How to use HTTP authentication

Postby j4505 » Tue Nov 19, 2013 3:40 am

I know this is a dead thread... just wanted to post what worked for me... hopefully someone else searching for a solution finds it. I fixed it by adding:
Code: Select all
proxy_set_header Authorization "";
to the location block in nginx.

-J
j4505
 
Posts: 1
Joined: Tue Nov 19, 2013 3:38 am

Re: How to use HTTP authentication

Postby pchander » Tue Nov 19, 2013 3:43 am

Thanks, I'll try that.
pchander
 
Posts: 2
Joined: Tue Sep 25, 2012 7:20 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 21 guests