Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a problem. I'm using Legrandin's NTLM Authentication Module PyAuthenNTLM2 with my Apache2 server. It really works well and it was easy to install. I recommend it to everybody.

The authentication works perfectly fine. But I have a problem once POST-Requests are sent. Everytime a POST is sent to the server, IE's annoying credentials prompt keeps appearing. Even though I checked "Remember my Credentials". This is how I have it configured right now:

<Directory /var/www/>
            AuthType NTLM
            AuthName DOMAIN
            require valid-user

            PythonAuthenHandler pyntlm
            PythonOption Domain DOMAIN
            PythonOption PDC 123.45.67.89
            PythonOption BDC 123.45.67.89

            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
</Directory>

My question to you guys:

Is it possible to do the authentication only on one single URL?

For example: If a user access my page for the first time, the URL will be: http://domain.com/custom/login. This URL doesn't represent the directory though. It's just a controller of the Zend Framework.

Is this possible?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

What you're looking to do is use the <Location> container, which maps URLs to options, like:

<Location /custom/login>
    ... options ...
</Location>
share|improve this answer
    
Hi. Thanks for your response. I tried replacing the Directory Tag with a Location tag (like in your example) and it didn't work. –  Kel Mar 16 '12 at 14:14
    
It did not work at all, or produced the same results as before? –  Kyle Smith Mar 16 '12 at 14:35
    
This is what gets logged: [Fri Mar 16 15:35:08 2012] [notice] [client IP] PYNTLM: User username/DOMAIN has been authenticated to access URI /custom/index/login Looks like the <Location>-Tag fires. I will check the code now and see if it gets the REMOTE_USER. –  Kel Mar 16 '12 at 14:37
    
I can verify that I get a value for the property PHP_AUTH_USER with <Location /> but not with <Location /custom/login>. –  Kel Mar 16 '12 at 14:44
    
I just saw that the username gets passed to another variable, if you use <Location /custom/index/login>. The username is now available in $_SERVER['REDIRECT_REMOTE_USER']. It works Kyle, thanks a lot :) –  Kel Mar 16 '12 at 15:09
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.