Re: Password protecting cgi-bin

From: Shawn Bayern (shawn.bayern@yale.edu)
Date: Fri Jan 21 2000 - 13:36:42 EST


Hey there, Drew --

> Is there a way to password protect a cgi-bin directory (a la
> .htaccess)? Putting a properly written .htaccess file in the
> directory with the right permissions doesn't do it.

This is a question specific to the web server you're running; there's no
universal answer or standard. The major servers (Netscape and Apache) let
you do this through centralized configurations and .htaccess files. (Of
course, the syntax varies *wildly* from server to server, and even
sometimes from version to version of the same server.)

My impression was .htaccess files were checked for by default in Netscape
and Apache; if it's not working for you, check to make sure the syntax of
your .htaccess file is appropriate for the server you're running.

If you're running Apache (which I'll assume since that's more common on
Linux), you can protect a specific cgi-bin directory with a <Directory>
block in httpd.conf; Apache docs describe all the options you can use
inside <Directory> blocks. If you NEED it to work through an .htaccess
file, make sure your AllowOverride directive (in httpd.conf) isn't
occluding your specific .htaccess directives.

Shawn



This archive was generated by hypermail 2b29 : Wed Apr 27 2005 - 03:30:03 EDT