ACP Apache Authentication
- This is for installing ACP with Apache authentication. If you want to install ACP with the default firebase authentication , use the instructions on the main install page here.
- This is for installing ACP with Apache authentication. If you want to install ACP with the default firebase authentication , use the instructions on the main install page here.
Passing the user name to ACP (no PHP)
ACP reads the signed-in user's name from a hidden acp_user_name div in index.html. Apache Server Side Includes (mod_include) writes the name into that div. PHP is no longer used or needed. Do not install it.
httpd.conf
- Check that this line is not commented out (it is enabled in a default Apache install):
LoadModule include_module modules/mod_include.so
- Inside the
<Directory "d:\Acp\ui\build">block, addIncludesto theOptionsline and add theAddOutputFilterline after it:
Options -Indexes +FollowSymLinks +Includes
AddOutputFilter INCLUDES .html
- Keep the existing style of the
Optionsline. If it uses+/-, write+Includes. If it doesn't (e.g.Options Indexes FollowSymLinks), write plainIncludes. Apache will not start if one line mixes the two styles. - There must be no PHP lines in httpd.conf (
LoadModule php_module,AddType application/x-httpd-php,AddHandler application/x-httpd-php,PHPIniDir). - For password file, Windows (SSPI) or LDAP authentication, the auth section must include:
RequestHeader set X-Remote-User %{REMOTE_USER}s
index.html
- In
d:\Acp\ui\build\index.html, theacp_user_namediv must contain the SSI tag that matches your authentication method:
| Authentication | Tag in index.html |
|---|---|
| Password file, Windows (SSPI) or LDAP | <!--#echo var="HTTP_X_REMOTE_USER" -->
|
| Azure / Entra ID (OpenID Connect) | <!--#echo var="OIDC_CLAIM_email" -->
|
- The file is minified onto one long line. Do not edit it by hand. Use Notepad's Edit > Replace (Ctrl+H) and Replace All. If the file still has an old PHP tag (e.g.
<?php echo $_SERVER['HTTP_X_REMOTE_USER']; ?>), replace it with the tag above. Notepad should report exactly one replacement. - Use straight quotes (
"), not curly quotes (“ ”). - If the user name shows as
(none), use<!--#echo var="REMOTE_USER" -->instead. - Deploying a new ACP UI build overwrites
index.html. Check the tag again after every UI update.
Restart and verify
- Restart Apache: Services > Apache2.4 > right-click > Restart.
- Sign in to ACP. The correct user should show, and models should open.
- In the browser, press Ctrl+U (View Source). The
acp_user_namediv should contain the user name. There should be no<!--#echoand no<?phpin the page source.
Apache Authentication
Password file
- (Create a file
passwordswithout extension. Save this inC:\Apache24\password
(This file should be placed somewhere not accessible from the web so that it cannot be downloaded}.
- To create the file, use the htpasswd utility that came with Apache. This will be located in Apache24 bin directory. In a command prompt:
(Substitute your desired username here>.
c:\Apache24\bin>htpasswd -c c:\Apache24\passwords <yourusername>
{The -c flag creates a new file}
- htpasswd will ask you for the password, and then ask you to type it again to confirm it:
New password: ************
Re-type new password: ************
Adding password for user yourusername
Add/Manage users
Add any other users and password pairs later. You can refer to this page
Apache windows sspi authentication
The mod_authnz_sspi module is no longer available from Apachehaus. It has been replaced by the NTLM module. We have not configured this module on our servers and cannot provide further instructions at this time, but the folllowing may still work if you replace the mod_authnz_sspi with the mod_authn_ntml module .
Add the Apache Windows sspi Authentication module
- Download the module and unzip it to a folder.
https://www.apachehaus.net/modules/mod_authnz_sspi/mod_authnz_sspi-0.1.1a1-2.4.x-x64-vc15.zip
- Note that this module is not from Apache. This most recent version is vc15 - this is an add on done by the community.
- From the downloaded folder:
Apache24\modulescopymod_authnz_sspi.soand save to the Apache modules directory.
C:\Apache24\modules\mod_authnz_sspi.so
- Copy:
Apache24\bin\sspipkgs.exeand save it in the Apache bin directory.
C:\Apache24\bin\sspipkgs.exe
Add/Manage users
- Ensure each user has a windows account. (If not, add them as a local user from computer management and create a password for them). This will be the user name to sign into ACP and the windows password will be the password for ACP. So if they are a new user you will need to give then the windows credentials. There is no way for a user to set their own password unless they have access to the server's computer management.
- An admin will need to add the users to the ACP projects they will be a member of.
- An admin will need to change passwords.
Connect to a Microsoft on premises active directory with LDAP
LDAP Documentation:
https://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html https://coderanger.net/~coderanger/tracdoc/install/apacheauth.html#windows-active-directory
- Uncomment these 2 lines in the httpd.conf file
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule ldap_module modules/mod_ldap.so
Binding information: To connect to the active directory, we need the values for these 3 Apache configuration variables:
AuthLDAPBindDN
AuthLDAPBindPassword
AuthLDAPURL )
- Add the authentication section to the httpd.conf file in the directory tags (Lumina will normally do this as part of the apache httpd.conf file setup).
#Auth section
AuthType Basic
AuthName "ldap authentication"
AuthBasicProvider ldap
AuthLDAPBindDN "<<Enclode the BindDN in quotes, with single quotes around filters with spaces.>>"
AuthLDAPBindPassword
AuthLDAPURL 'Single quotes around the entire LDAP URL and double quotes around any filters with spaces'
LDAPReferrals Off
Require valid-user
RequestHeader set X-Remote-User %{REMOTE_USER}s
#end auth_basic_module#