Mailinglist Archive: opensuse (2532 mails)

< Previous Next >
Re: [opensuse] Hopefully easy .htaccess question for apache2 on 10.3
  • From: "David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx>
  • Date: Tue, 06 May 2008 17:05:03 -0500
  • Message-id: <4820D60F.6020707@xxxxxxxxxxxxxxxxxx>
David C. Rankin wrote:
Listmates,

I was implementing simple access restrictions in apache on 10.3 trying both the .conf approach and a few simple .htaccess files. Nothing special, just following along with the apache manual. I have 2 questions. First the simple access protections being implemented are:

AuthType Basic
AuthName "Restricted Files"
#
## file Auth
#
# # (Following line optional)
# AuthBasicProvider file
AuthUserFile /usr/local/lib/apache2/passwd
AuthGroupFile /usr/local/lib/apache2/group
Require group skyline
#
## dbm Auth
#
# AuthBasicProvider dbm
# AuthDBMUserFile /usr/local/lib/apache2/passwd
# Require valid-user

I have build both the flat file and the dbm file and they work fine. However, I still have the questions:

(1) The apache2 manual states: "The directives discussed in this article will need to go either in your main server configuration file (typically in a <Directory> section), or in per-directory configuration files (.htaccess files)."


I solved #1 with an rcapache2 shutdown and then start as opposed to a 'restart'. Don't know why that matters, but now including the access restrictions in the <directory> designation works.


(2) When I place an .htaccess file in the directory I want to protect, it causes the directory to disappear from the directory list in the browser. If it was samba, it would have the same effect as setting "browsable = no". I can access it just fine typing the url directly into the browser and then I am correctly prompted for a username and password and then given access. If I then refresh the directory listing, I can see the directory just fine. But until I have authenticated, the protected directory is hidden.

Is there any way I can change this behavior to make all directories visible and then when I click on the protected ones, it will bring up the password prompt? I would hate to have to remember all the directory names that are protected. Any thoughts?

Thanks again.


--
David C. Rankin, J.D., P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
References