Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

.htaccess doesn't work in subdir of cgi-bin?

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Logging  
Author Message
mattes4444

External


Since: Nov 30, 2004
Posts: 3



(Msg. 1) Posted: Tue Nov 30, 2004 5:35 pm
Post subject: .htaccess doesn't work in subdir of cgi-bin?
Archived from groups: alt>apache>configuration (more info?)

Hello all,

I try to protect the cgi-bin directory which includes my file
viewcvs.cgi . It's in a subfolder cgi-bin/viewcvs/
I'd like to use a .htaccess file but this doesn't seem to work there:

the .htaccess file:

AuthType Basic
AuthName "ViewCVS"
AuthUserFile /usr/lib/cgi-bin/viewcvs/.htpasswd
require valid-user

and in the httpd.conf I just manipulated the entry
AllowOverride None to ... AuthConfig
should work, or not?:

<Directory /usr/lib/cgi-bin/>
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>


But it doesn't work... just no kind of password request. It also doesn't
help to write <Directory /usr/lib/cgi-bin/viewcvs/>.
Same .htaccess works in a user public_html directory!
Server is Apache 1.3.26 on debian.
Any ideas?
Thanks a lot!
cheers

Mattes

 >> Stay informed about: .htaccess doesn't work in subdir of cgi-bin? 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Wed Dec 01, 2004 1:35 am
Post subject: Re: .htaccess doesn't work in subdir of cgi-bin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2004-11-30, Mattes Herrlich <mattes4444.RemoveThis@gmx.de> wrote:
 > I try to protect the cgi-bin directory which includes my file
 > viewcvs.cgi . It's in a subfolder cgi-bin/viewcvs/
 > I'd like to use a .htaccess file but this doesn't seem to work there:

Usually the cgi-dir directory uses the ScriptAlias directive, that
include something like AllowOverride None that (in turn) disable the
use of .htaccess file.

You have two way: enable htacces by AllowOverride Auth or put your
authentication options directly in httpd.conf

Davide

--
The day Micro$lop makes something that doesn't suck is probably the
day they start making vacuum cleaners.
--Ernst Jan Plugge<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: .htaccess doesn't work in subdir of cgi-bin? 
Back to top
Login to vote
mattes4444

External


Since: Nov 30, 2004
Posts: 3



(Msg. 3) Posted: Wed Dec 01, 2004 3:35 am
Post subject: Re: .htaccess doesn't work in subdir of cgi-bin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello Davide,

 > Usually the cgi-dir directory uses the ScriptAlias directive, that
 > include something like AllowOverride None that (in turn) disable the
 > use of .htaccess file.
 >
 > You have two way: enable htacces by AllowOverride Auth or put your
 > authentication options directly in httpd.conf

Yes, but didn't I do that by writing this into the httpd.conf?:

<Directory /usr/lib/cgi-bin/>
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

Because of "AllowOverride AuthConfig", the use of .htaccess should work
for all files in /usr/lib/cgi-bin/ and its subdirectories, or am I wrong
here?
Unfortunately it doesn't work..
cheers,

Mattes<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess doesn't work in subdir of cgi-bin? 
Back to top
Login to vote
mattes4444

External


Since: Nov 30, 2004
Posts: 3



(Msg. 4) Posted: Wed Dec 01, 2004 3:35 am
Post subject: Re: .htaccess doesn't work in subdir of cgi-bin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Oh my dear!
It works now, sorry for asking!

It seems I forgot to restart the browser (yes, the browser, I already
restarted apache) after having accessed the page without .htaccess
previously. Wink
cheers

Mattes
 >> Stay informed about: .htaccess doesn't work in subdir of cgi-bin? 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 5) Posted: Wed Dec 01, 2004 4:35 am
Post subject: Re: .htaccess doesn't work in subdir of cgi-bin? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2004-12-01, Mattes Herrlich <mattes4444.RemoveThis@gmx.de> wrote:
 > Yes, but didn't I do that by writing this into the httpd.conf?:
 ><Directory /usr/lib/cgi-bin/>
 > AllowOverride AuthConfig
 > Options ExecCGI
 > Order allow,deny
 > Allow from all
 ></Directory>

Well, yes. I tried the same with Apache 1.3.31 and it worked, only
differences: I used "AllowOverride All" and "Options +ExecCGI".
Maybe is a problem in the different version of Apache.

You can try using those directives, then adding the Auth* directives
directly in the httpd.conf. Other than that, maybe upgrade is an
option.

Davide

--
Sysadmins don't go to hell; we're already doing our time in purgatory.
--Peter deFriesse<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess doesn't work in subdir of cgi-bin? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
rewrite: Map Subdomain to Subdir - Hello, using mod_rewrite in .htaccess files I want to map the URL http:/ forum.xgm.de to http://xgm.de/forum/ transparently for the user. I've the following in my .htaccess RewriteEngine On RewriteCond %{HTTP_HOST} ^forum.xgm.de$ RewriteRule ^/(.*)..

htaccess doesn't work - hi, i made an htaccess file with htpasswd file but it didn't seem to worl on that directory. so i have to make an entry in httpd.conf for using htaccess?

I cant get .htaccess to work - I am runnning apache on SuSE 7.2 pro, I have several Virtual hosts all working correctly - I want to password protect one of the directories. but it doesnt want to work. I have added into the httpd.conf as follows <VirtualHost 212.19.66.163:80> ...

htaccess include_path doesn't work - Hi I tried getting help from alt.comp.lang.php and got no response so I'm hoping there's a guru here that would help me. I'm trying to set a 'default' include path for the entire site using an ..htaccess file but it doesn't work. The include path alway...

htaccess password won't work... - Hi, I getting a bit insane of the .htaccess stuff... I just trying out how to set a password to a directory on my windows notebook. Now I've set all files in the root. The request for a password is fine but it won't accept mine... In all the examples...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]