2020-12-08

Integrated Windows Authentication with Apache 2.4 on Windows

Download mod_authnz_sspi from Here (The ApacheHaus US)

Uncompress it and copy mod_authnz_sspi.so to Apache\modules

Add Configuration in http.conf

LoadModule authnz_sspi_module modules/mod_authnz_sspi.so

<VirtualHost *:80>
  ServerName some.domain.com
  DocumentRoot "/some/path/local"
  <Directory "/some/path/local">
    Options my-options
    AllowOverride AuthConfig my-other-overrides
#   Require all granted
    <IfModule authnz_sspi_module>
      AuthName "SSPI Protected Place"
      AuthType SSPI
      SSPIAuth On
      SSPIAuthoritative On
      SSPIOfferBasic On
      # Should you need to force the login prompt, uncomment the next line
      # SSPIBasicPreferred On
      SSPIOfferSSPI On
      SSPIOmitDomain On
      <RequireAll>
        <RequireAny>
          Require valid-sspi-user
#         Require valid-user
        </RequireAny>
        <RequireNone>
          Require user "ANONYMOUS LOGON"
        </RequireNone>
      </RequireAll>
    </IfModule>
  </Directory>
</VirtualHost>

沒有留言:

張貼留言