I'm hitting a snag with htaccess. Have created .htaccess and .htpasswd files, set up apache directory options just like always... the exact same setup works fine on CentOS 3, but I can't seem to get it to authenticate on CentOS 4? Am I just being blind stupid (as in not seeing something 'exactly the same') or is there something different I'm missing? I have selinux running in warn mode I think it was, but not fully enabled. Best, John Hinton
On 7/23/05, John Hinton <webmaster at ew3d.com> wrote:> I'm hitting a snag with htaccess. Have created .htaccess and .htpasswd > files, set up apache directory options just like always... the exact > same setup works fine on CentOS 3, but I can't seem to get it to > authenticate on CentOS 4? Am I just being blind stupid (as in not seeing > something 'exactly the same') or is there something different I'm > missing? I have selinux running in warn mode I think it was, but not > fully enabled. >Well, operating off the assumption of blind stupidity... you *did* remember the AllowOverride option to be able to actually use htaccess files right? Just to be safe, you might also ls -Z the files to be sure they have the proper context for selinux. I've heard rumors of selinux causing issues with apps in warn mode, but I've not actually experienced it. -- Jim Perrin System Administrator - UIT Ft. Gordon & US Army Signal Center
> >I'm hitting a snag with htaccess. Have created .htaccess and .htpasswd >files, set up apache directory options just like always... the exact same >setup works fine on CentOS 3, but I can't seem to get it to authenticate on >CentOS 4? Am I just being blind stupid (as in not seeing something 'exactly >the same') or is there something different I'm missing? I have selinux >running in warn mode I think it was, but not fully enabled. > >Best, >John HintonHello, John. The problem might be that you have the mod_auth_mysql module enabled. Please have a look at your '/var/log/httpd/ssl_error_log' file. If you find an error like the following: 'MySQL ERROR: Table 'test.user_info' doesn't exist' Then it means that the mod_auth_mysql module is enabled, making Apache to look for the permissions in the MySQL database, and completely forgetting the .htaccess and .htpasswd files. In this case, just remove the module like this: yum remove mod_auth_mysql or rpm -e mod_auth_mysql And then restart apache: 'service httpd restart' Then it should work. This is a strange behaviour I know, but it doesn't bother anybody, appart of those using that function unfortunately... Else, please report the error that you receive in your /var/log/httpd/ssl_error_log' file. Regards, Daniel