views:

79

answers:

1

Hi guys,

Sorry that I haven't done much of my own research but I do not know how to set up basic authentication, nevermind removing it!

Thanks.

EDIT: Sorry, what was I thinking, its in httpd.conf or includes!

A: 

This is more a question for ServerFault, but I'm going to carry on and assume you're using Apache on FreeBSD.

The authentication is set in either the httpd.conf (main Apache configuration file) or a .htaccess file in the directory that serves the protected content.

In the httpd.conf file, you'll come across a Directory or Location statement which matches, respectively, either the physical filesystem directory where the protected content is stored, or the URI of the protected content.

In either case, the authentication is a set of lines beginning with Auth. Simply comment those out - if they're in the httpd.conf file, you'll need to restart your Apache server, if in a .htaccess file it should take effect right away.

Examples:

In httpd.conf, files in /srv/www/protected are protected by authentication:

<Directory /srv/www/protected>
    AuthType basic
    AuthName "My Protected Site"
    ...
</Directory>

Or, within the /srv/www/protected directory in a file called .htaccess:

AuthType basic
AuthName "My Protected Site"
...
Andy Shellam