-
Any idea why the following Apache config is not able to enable Basic Auth in my LAMP app?
ServerName %{HTTP_HOST} <VirtualHost *:80> DocumentRoot /app/data/public LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy CustomLog "|/bin/cat" proxy ErrorLog "|/bin/cat" <Directory /app/data/public> # Options +FollowSymLinks # AllowOverride All # Require all granted Options +FollowSymLinks AllowOverride None AuthType Basic AuthName "Secure Content" AuthBasicProvider file AuthUserFile "/app/data/apache/.htpasswd" Require valid-user </Directory> # Do not remove this include. It's required for your app to see the Real IP Include "/app/code/apache/rpaf.conf" # This line can be commented out, if you do no require PHPMyAdmin Access Include "/app/code/apache/phpmyadmin.conf" </VirtualHost>
-
@shrey
Correct the lineAllowOverride None AuthType Basic AuthName "Secure Content" AuthBasicProvider file AuthUserFile "/app/data/apache/.htpasswd" Require valid-user </Directory>"
to
AllowOverride All Require valid-user AuthName "Cloudron LDAP Authentication" AuthBasicProvider ldap AuthType Basic AuthLDAPURL ${CLOUDRON_LDAP_URL}/${CLOUDRON_LDAP_USERS_BASE_DN}?username?sub?(username=*) AuthLDAPBindDN ${CLOUDRON_LDAP_BIND_DN} AuthLDAPBindPassword ${CLOUDRON_LDAP_BIND_PASSWORD} </Directory>
This is a ready-made way through Cloudron and you can create a special "user" account for authorization purposes.
-
@matix131997 said in Basic Auth in LAMP not working:
AllowOverride All
Strangely, this is working in Firefox, but not Chrome (tried Incognito).
Correction: it works (had to clear site data & cookies).
-
-