Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache .htacess not working properly (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Evileye
l33t
l33t


Joined: 06 Aug 2003
Posts: 782
Location: Toronto

PostPosted: Wed Aug 15, 2012 8:27 pm    Post subject: Apache .htacess not working properly (SOLVED) Reply with quote

Hello everyone,

I'm having a problem with an .htaccess file. Right now I have it setup as follows...

example.com/directory/.htaccess

...when I visit example.com it asks for an username and password but it shouldn't

I want it setup so when I visit example.com/directory/ it asks for a username and password. Anyone know whats wrong or why it's acting this way?

Thanks


Last edited by Evileye on Sun Aug 19, 2012 12:14 am; edited 1 time in total
Back to top
View user's profile Send private message
zoidie
n00b
n00b


Joined: 13 Apr 2010
Posts: 47

PostPosted: Thu Aug 16, 2012 1:56 pm    Post subject: Reply with quote

The only thing I can think of is that you have accidentally copied the .htaccess file to a the root directory of the server. The only way I could recreate this behaviour on my test server was copying the .htaccess to /var/www/localhost.

If not that, what is the contents of your .htaccess file?
Back to top
View user's profile Send private message
Evileye
l33t
l33t


Joined: 06 Aug 2003
Posts: 782
Location: Toronto

PostPosted: Thu Aug 16, 2012 10:29 pm    Post subject: Reply with quote

I checked all the directories and the .htaccess is in the right place. Here are the contents of my .htaccess
Quote:
AuthType Basic
AuthName "Directory"
AuthUserFile /home/.htpasswd

<Limit GET>
require valid-user
</Limit>
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Fri Aug 17, 2012 8:47 am    Post subject: Reply with quote

Did you double/triple check Apache's global configuration ?
Back to top
View user's profile Send private message
Evileye
l33t
l33t


Joined: 06 Aug 2003
Posts: 782
Location: Toronto

PostPosted: Sat Aug 18, 2012 11:57 pm    Post subject: Reply with quote

I changed the name of the directory and now it's working. Strange. Don't know what the problem was. The folder was called apps and I renamed it applications
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Sun Aug 19, 2012 7:38 am    Post subject: Reply with quote

I'm quite sure it's because you have somewhere in your Apache global configuration files a reference to "apps".

Worth a check :)
Back to top
View user's profile Send private message
Evileye
l33t
l33t


Joined: 06 Aug 2003
Posts: 782
Location: Toronto

PostPosted: Mon Aug 20, 2012 2:58 am    Post subject: Reply with quote

I completely removed apache from my system including all files in /etc/apache2. I then reinstalled apache and ran into the same problem. Doesn't make any sense to me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum