I'm working on an upcoming project, but the team needs to access it online. I've setup (for now) Basic Authentication using:
<Directory /var/www/html>
AuthType Basic
AuthName "Staging"
AuthUserFile /etc/passwd
Require valid-user
</Directory>
But, I need one file to be publically accessible (a 3rd party service needs to ping it, but can't handle Basic Authentication. Is it possible to "turn off" authentication for a specific file ("specific-file.php")?
I was looking into:
<Files "/var/www/html/specific-file.php">
### SOMETHING
</Files>
but it is not clear to me how to disable the protection.
Thanks!
The htpasswd command will allow us to create a password file that Apache can use to authenticate users. We will create a hidden file for this purpose called . htpasswd within our /etc/apache2 configuration directory. The first time we use this utility, we need to add the -c option to create the specified passwdfile.
It is important to be aware, however, that Basic authentication sends the password from the client to the server unencrypted. This method should therefore not be used for highly sensitive data, unless accompanied by mod_ssl . Apache supports one other authentication method: AuthType Digest .
Introduction. HttpClient supports three different types of http authentication schemes: Basic, Digest and NTLM. These can be used to authenticate with http servers or proxies.
Apache supports one other authentication method: AuthType Digest . This method is implemented by mod_auth_digest and is much more secure. Most recent browsers support Digest authentication. The AuthName directive sets the Realm to be used in the authentication.
This works for me:
Allow from all
Satisfy any
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With