LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-23-2005, 04:55 AM   #1
Barca
LQ Newbie
 
Registered: Nov 2004
Location: Poland
Distribution: Slackware - best and only ;]
Posts: 29

Rep: Reputation: 15
Directory with .htaccess is invisible?!


Hi, my problem is somehow strange
On my Apache server I have direcotry /home/barca/www/secret. When I put to "secret" files .htaccess and .htpasswd, "secret" directory is NO MORE VISIBLE in web browsers. I mean, when I open myserver.com/~barca i see no directory "secret" anymore. After deleting file .htaccess, directory "secret" is shown.
When I put .htacess to /home/barca/www, everything is fine, he asks me for login and password. So, I was comparing settings about those two directories but din't find anything. Files .htaccess and .htpasswd are OK, because I tested them on other web server.
Yes, I've read http://httpd.apache.org/docs-2.0/how...n#troubleshoot and many more documents... Please help
 
Old 02-23-2005, 06:22 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Can you still access the secret folder when the .htaccess and .htpasswd files are there.
eg. myserver.com/~barca/secret/
?
 
Old 02-23-2005, 08:13 AM   #3
Barca
LQ Newbie
 
Registered: Nov 2004
Location: Poland
Distribution: Slackware - best and only ;]
Posts: 29

Original Poster
Rep: Reputation: 15
No, when I try to view http://myserver.com/~barca/secret I get:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@myserver.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

I had set AllowOverride All and it didn't change anything
 
Old 02-23-2005, 09:44 AM   #4
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Well, that ISE the reason why secret directory is not seen in the listing.

Now if you follow the instructions on screen and see your error log, what you have?
 
Old 02-23-2005, 09:45 AM   #5
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Posting your .htaccess file and a sample line (create a new name/password pair for this exercise) from your AuthUserFile would be helpful in diagnosing it -- along with the full filename (e.g., /var/www/vhost/secret/.htaccess) and permissions (e.g., -rwxr--r--).
 
Old 02-23-2005, 12:28 PM   #6
Barca
LQ Newbie
 
Registered: Nov 2004
Location: Poland
Distribution: Slackware - best and only ;]
Posts: 29

Original Poster
Rep: Reputation: 15
Heh, now, after many changes in httpd.conf, when I go to http://myserver.com/~barca/secret I get dialog window and when I enter correct user/pass I can enter I'm then in http://myserver.com/~barca/secret and when I press "Parent Directory" I'm in http://myserver.com/~~barca/ and I SEE "SECRET" DIRECTORY. But, when I go directly to http://myserver.com/~barca, then directory "secret" is still invisible.

It's from my access_log (when I opened URL http://myserver.com/~barca/secret and I get dialog window with ask for user/pass):

192.168.0.1 - - [23/Feb/2005:19:17:28 +0100] "GET /~barca/secret HTTP/1.1" 401 401 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"

In /home/barca/www/secret I have .htpasswd and .htaccess:

AuthUserFile /home/barca/www/secret/.htpasswd
AuthName "Co sie mowi? ;]"
AuthType Basic
Require valid-user
Order allow,deny
Allow from all

Permissions are:

-rw-r--r-- 1 barca users 138 2005-02-23 19:15 .htaccess

PS You can treat "Co sie mowi?" as polish equivalent for Bugs Bunny's "What's up doc?"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Invisible Directory 900i Mandriva 6 12-09-2004 03:26 PM
X11 directory invisible? astrowill Linux - Newbie 3 07-22-2004 12:46 PM
Problem moving directory - invisible bits? slakmagik Linux - Software 9 12-01-2003 05:11 PM
invisible directory prowlerxpla Linux - Software 1 09-11-2003 09:50 AM
Directory listing control with .htaccess quincy56 Linux - Security 0 02-09-2002 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration