Welcome to WebmasterWorld Guest from 50.16.24.12

Forum Moderators: Ocean10000 & incrediBILL & phranque

Web Server ignoring .htaccess

Just stumped....

   
12:51 am on Nov 2, 2001 (gmt 0)

10+ Year Member



Spent the better half of this day tryin' to figure this one out, and I'm betting it's something easy. Any other time I've dealt with htaccess or htpasswd, it's just simply worked out of the box. No changes or anything....

Now I'm working on a newly built Solaris 8 box with Apache 1.3.20. I didn't build it, but it all looks "in order." However, it seems to be ignoring anything in .htaccess. I'm trying to set up a password for a directory, and cgi-bin access. (An application we have is entirely cgi...no external files except some graphics and a style sheet) No errors, but I don't really expect any, it's simply ignoring .htaccess.

Any enlightenment? Anything else I could post that could be helpful?

2:58 am on Nov 2, 2001 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Did you check read permissions?
3:14 am on Nov 2, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check how the AllowOverride variable in the httpd.conf file is set. You can turn on (and off! ;)) specific .htaccess features there.
6:26 pm on Nov 2, 2001 (gmt 0)

10+ Year Member



> Did you check read permissions?

Yeah, permissions on .htaccess and .htpasswd are set to read.

Here's what I've tried. I set the AllowOverride to AuthConfig.

If I have .htaccess in both cgi-bin and webroot, and then hit the cgi application, the page loads without asking for a password, but the content from the webroot (images, css, and javascript) fail to load. Removing the .htaccess from webroot results in a perfectly loaded page, but no request for password.

.htaccess looks like:
AuthUserFile /usr/local/apache/conf/.htpasswd
AuthGroupFile /dev/null
AuthName "App Name"
AuthType Basic
require valid-user

1:37 am on Nov 3, 2001 (gmt 0)

10+ Year Member



Hi evinrude,

The .htaccess file looks OK to me.

> Here's what I've tried. I set the AllowOverride to AuthConfig.

Did you restart Apache? When changes are made to httpd.conf srm.conf or access.conf Apache normally needs to be restarted for the changes to become effective.

Also check that AuthConfig was added to AllowOverride in the correct
<Directory /paths>

In many Apache setups there can be several <Directory> directives, including a separate one for cgi-bin

1:18 pm on Nov 5, 2001 (gmt 0)

10+ Year Member



I had this problem, but I solved it by setting the .htaccess dir. in the config file.

There is a seperate directory setting for .htaccess files which is probably not the same as your webdocument directory. Check this out. I do not have my laptop with Apache with me at the moment so I can't check it out.

If you can't find this setting, reply and I'll take a look this evening.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month