title: Apache SSPI authentication
body: <p>For our Intranet we want to use a apache server that authenticates our users through SSPI.
  So, first some specs of the server:</p>
  
  <pre><code>Windows Server 2008 R2
  Apache 2.4(xampp)
  </code></pre>
  
  <p>In the logfile is now this error:</p>
  
  <pre><code>[Wed Dec 09 11:01:34.987431 2015] [authnz_sspi:error] [pid 3068:tid 1900] (OS 87)Falscher Parameter.  : [client ::1:59166] authentication failure for "/": user unknown, reason: cannot generate context
  </code></pre>
  
  <p>httpd.conf:</p>
  
  <pre><code>LoadModule authnz_sspi_module modules/mod_authnz_sspi.so 
  
  &lt;Directory "c:/xampp/htdocs/ebm"&gt;
  Options None
  AllowOverride All
  Order allow,deny
  Allow from all
  AuthName "SSPI Protected Place"
  AuthType SSPI
  SSPIAuth On
  SSPIAuthoritative On
  SSPIOfferBasic Off
  SSPIOmitDomain Off
  Require valid-user
  &lt;/Directory&gt;
  </code></pre>
  
  <p>As we are using vhosts too, here's the httpd-vhosts.conf:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
    DocumentRoot "C:/xampp/htdocs/ebm"
    ServerName intranet
    ServerAlias intranet
    ErrorLog logs/intranet-error_log
    TransferLog logs/intranet-access_log
    &lt;Location /htdocs/ebm/ &gt;
     AuthType SSPI
     AuthName "Test Login"
     SSPIAuth On
     SSPIAuthoritative On
     SSPIOfferBasic On
     SSPIOmitDomain Off
     SSPIBasicPreferred On
    &lt;/Location&gt; 
  &lt;/VirtualHost&gt; 
  </code></pre>
  
  <p>Actually sometimes it authenticates the user correctly, but most of the time i get an 401 when trying to connect to the intranet. What's wrong with it?</p>