View previous topic :: View next topic |
Author |
Message |
Evileye l33t
Joined: 06 Aug 2003 Posts: 782 Location: Toronto
|
Posted: Wed Aug 15, 2012 8:27 pm Post subject: Apache .htacess not working properly (SOLVED) |
|
|
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 |
|
|
zoidie n00b
Joined: 13 Apr 2010 Posts: 47
|
Posted: Thu Aug 16, 2012 1:56 pm Post subject: |
|
|
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 |
|
|
Evileye l33t
Joined: 06 Aug 2003 Posts: 782 Location: Toronto
|
Posted: Thu Aug 16, 2012 10:29 pm Post subject: |
|
|
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 |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Fri Aug 17, 2012 8:47 am Post subject: |
|
|
Did you double/triple check Apache's global configuration ? |
|
Back to top |
|
|
Evileye l33t
Joined: 06 Aug 2003 Posts: 782 Location: Toronto
|
Posted: Sat Aug 18, 2012 11:57 pm Post subject: |
|
|
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 |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Sun Aug 19, 2012 7:38 am Post subject: |
|
|
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 |
|
|
Evileye l33t
Joined: 06 Aug 2003 Posts: 782 Location: Toronto
|
Posted: Mon Aug 20, 2012 2:58 am Post subject: |
|
|
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 |
|
|
|