Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
            PythonOption BDC

            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all

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: This URL doesn't represent the directory though. It's just a controller of the Zend Framework.

Is this possible?

share|improve this question
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 ...
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

Your Answer


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.