password protect specific file in Centos 5.4 apache
Posted on 2012-09-15
I have a job interview coming up and the person interviewing me said he would like me to gain experience with apache. He said I will need to troubleshoot apache at the interview and one of the things I need to know is how to password protect a file. This is CentOS 5.4 Apache.
I was successful in password protecting a directory with htpasswd and htaccess but I am unable to do a specific file. I googled for a procedure and what I found didnt work. My understanding is it is all about what you put in htaccess.
Someone told me they dont even think its possible to only password protect a single file in Linux. Is that true? Is it possible the person interviewing me misspoke and meant to say "directory"?
If someone can open up my understanding to this and help me go into the interview with confidence on this subject, it would be greatly appreciated.