View Full Version : noob .htaccess issues
Ok, I am trying to secure the directory phpmyadmin resides in, have checked all the other posts on this subject, followed the instructions for creating .htaccess and .htpasswd files using telnet and the files exist in all the right places
BUT
It never asks for a user/pass when I go to the dir.
It's something simple probably but this noob needs help.
JayR
:confused:
Chicken 11-17-2001, 01:17 AM order allow,deny
allow from all
require user username
Authname 'Restricted Directory'
Authtype Basic
Try uploading the following .htaccess file to the directory, but change username to the site's username or admin (server admin), and see if it works.
didn't work I'm afraid, any other ideas?
Thanks
Jayr
Try this it works on my raq3
# Access file
order allow,deny
allow from all
require valid-user
Authname Seccam
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /homesites/url to directory/.htpasswd
I have a htadmin script if you would like it
Cheers Pete
Chicken 11-17-2001, 01:23 PM Second guess, as root, type this...
pico /etc/httpd/conf/access.conf
look for:
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
AllowOverride None
# ignore .ht*
<Files ".ht*">
deny from all
</Files>
Does this say, AllowOverride None or AllowOverride All ???
If it says AllowOverride None then change it to AllowOverride All save it (CTRL+X then Y then ENTER) and then restart httpd ( /etc/rc.d/init.d/httpd restart ).
well I couldn't find that bit of code in the httpd.conf file at all, why?, I haven't seen any info on the web or in the manual that says you have to turn this functionality on.
Jayr:confused:
Thanks again BTW, this is the most helpful forum I have come across.
Aha..........did some educated guessing......opened access.conf, lo and behold it had the relevant code and what you suggested has fixed the issue.
Thanks Chicken
Jayr
:D
Chicken 11-18-2001, 01:40 AM Oops, sorry, yes access.conf DOH! Sorry, I actually have a lot going on (off forum) and had a brain fade.
ThePrimeHost 02-22-2002, 08:12 PM This is exactly what I was looking for...step by step instructions on how to enable htaccess on a cobalt RAQ 4. But listed earlier in this thread this was written:
pico /etc/httpd/conf/httpd.conf
What should it be if I use access.conf instead?
Thank you for your help in advance.
Regards,
Darrell Buckhaults
ThePrimeHost 02-22-2002, 09:38 PM Please disregard my previous post....
After logging in as SU, I did the following:
pico /etc/httpd/conf/access.conf
changed AllowOverride None to AllowOveride All.
Bingo!
Restarted Apache and everything is golden...so far :D
Chicken 02-23-2002, 02:53 PM That was my mistake (the httpd.conf thing), and I've edited my post with the correct file name so as not to confuse people. Note however, I had listed it incorrectly originally and this is why there are confusing posts after it (in other words, other people aren't crazy, they were commenting on my mistake).
Use: pico /etc/httpd/conf/access.conf
kmurrey 02-23-2002, 09:14 PM Do I change this part of my access.conf file?
<Directory />
Options None
AllowOverride AuthConfig Indexes Limit
AuthFailDelay 2000000
</Directory>
so that it looks like this:
<Directory />
Options None
AllowOverride All
AuthFailDelay 2000000
</Directory>
______________________
Keith
kmurrey 02-23-2002, 09:24 PM Never mind folks.... I got it to work....
Thanks Chicken. Thanks everyone - I have learned so much from this site.
___________________________
Keith
Chicken 02-23-2002, 09:40 PM Originally posted by kmurrey
Do I change this part of my access.conf file?
In case anyone else wonders, no (I know you already know).
|