New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

.htaccess doesn't work

Got problems with your B2 or B3? Share and get helped!
Post Reply
kruemelprinz
Posts: 17
Joined: 05 May 2010, 16:53

.htaccess doesn't work

Post by kruemelprinz »

Hi all

I would like to protect a part of my website on my bubba2 with .htaccess because this seems to be the easiest way for me as a linux/unix dummie. i created a .htaccess file containing the following rows:

AuthName "Enter password"
AuthType Basic
AuthUserFile /.htpasswd
Require valid-user

the .htpasswd is in the same directory and contains the login data in

user:password

format.
I have switched on the AllowOverride option to "all" in Apache2 server and restarted it.
BUT: It won't work. I have tried different locations and paths for the .htpasswd without success.
Is there anyone who can help me on that issue?
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: .htaccess doesn't work

Post by RandomUsername »

Let's start with the easiest question; what's the URL of the part you're trying to protect (and the filesystem path too)?
kruemelprinz
Posts: 17
Joined: 05 May 2010, 16:53

Re: .htaccess doesn't work

Post by kruemelprinz »

the path on the bubba would be
/home/web/"ourwebsite"/Tagebuch
in which Tagebuch.html is located that should be protected. this is where i have both .htaccess and .htpasswd with the respective contents as posted above.

as an URL it looks like that
http://"ourwebsite".bubbaserver.com/"ourwebsite"/Tagebuch

"ourwebsite" is of course my easyfind name which should not be of any importance for that issue if I understand it right...
asparak
Posts: 173
Joined: 08 Jun 2009, 07:38

Re: .htaccess doesn't work

Post by asparak »

There was a how-to in the section at the bottom of the forum on how to enable .htaccess as its not switched on in the webserver by default. Have you had a look at that?
kruemelprinz
Posts: 17
Joined: 05 May 2010, 16:53

Re: .htaccess doesn't work

Post by kruemelprinz »

I took a look at the howto and did exactly as instructed (including the instruction to have the .htpasswd in /etc/.passwords). I also changed .htaccess so that the path to the password file is right.
.htaccess is now placed in /home/web, so I suppose i should get a password request when just typing
http://"ourwebsite".bubbaserver.com
which I don't get. for none of the "subfolders" either.
Post Reply