-
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> -
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.
-
@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).
-
@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).
@shrey This is interesting. I hadn't noticed before that you had a complete different way of authorization. That's why I made an edit to the post and gave you the exact instruction, which is already implemented as standard.
-
G girish has marked this topic as solved on
-
G girish moved this topic from Support on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login