Menu

Trouble with 401 and ProxyPass

Help
2012-08-09
2013-05-01
  • Daniel Berger

    Daniel Berger - 2012-08-09

    Hi,

    I'm just futzing with mod_auth_sspi on my local desktop and, for the most part, everything works as expected. I'm working with Ruby on Rails, so I've setup a ProxyPass through port 3000 (I'm using WEBrick, a simple Ruby web server), and that works fine for the most part.

    The problem I'm having is that a 401 doesn't seem to get passed back through the proxy. I just get an error page. I can see the error in the Apache log file. But it never gets back to WEBrick.

    What I want is to be able to handle the 401 within the Rails, but at the moment it never gets the chance to. Basically I want to intercept the 401 and simply redirect them to the login page.

    I have a pretty standard setup I think:

    LoadModule sspi_auth_module modules/mod_auth_sspi.so
    <VirtualHost *:80>
      ServerName foo.localhost.com
      DocumentRoot c:/Users/me/workspace/foo/public/
      <Directory c:/Users/djberge/workspace/foo>
        AllowOverride all
        Options -Multiviews
        Order Allow,Deny
        Allow from all
      </Directory>
      ProxyPass / http://127.0.0.1:3000/
      <Proxy *>
        AuthName "MyStuff"
        AuthType SSPI
        SSPIAuth On
        SSPIAuthoritative On
        SSPIOmitDomain On
        SSPIUsernameCase lower
        require valid-user
        #require user foo\bar
      </Proxy>
    </VirtualHost>
    

    Is there some Apache directive I need to add to get the 401 to proxy back?

    Thanks,

    Dan

     
  • Daniel Berger

    Daniel Berger - 2012-08-09

    Typo in my post. The DocumentRoot and Directory actually do match in reality. SF doesn't support editing posts apparently.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.