0
votes

This is the path of folder where are my web documents and which I want to protect: "C:\Program Files\PostgreSQL\EnterpriseDB-ApachePhp/apache/www/MyWeb"

Also in this folder I placed: .htaccess and .htpasswd

My .htaccess has following: AuthName "Protected site" AuthType Basic AuthUserFile C:\Program Files\PostgreSQL\EnterpriseDB-ApachePhp/apache/www/MyWeb/.htpasswd require valid-user

In httpd.conf for DocumentRoot "C:\Program Files\PostgreSQL\EnterpriseDB-ApachePhp/apache/www" I changed AllowOverrid None to All and added row AccessFileName .htaccess as below: AccessfileName .htaccess

Options FollowSymLinks AllowOverride None ----> All Order deny,allow Deny from all

So this is what I have done exactly!

And sorry for question I asked one more time, becuase It seems to me that people answere on question only in first tem minutes, after that it falls in oblivion. :)

2
Can you show your htaccess file?Pekka

2 Answers

0
votes

Make sure that the file is called .htaccess, your path says it is .htpasswd.

And you need to have htaccess handling enabled in your apache config. I think this is needed: AllowOverride AuthConfig

0
votes

After few days I finally found out what was wrong with my settings. First, I did huge mistake not to restart apache after every change I've done (AllowOverride All). So have in your mind to do this If you rewrite something in your httpd.conf...And second thing I've not seen that it is wrong: is path in my .htaccess file where It should be written with " ". Because "Program Files" has space in the name between words.

I hope my tips will be useful for someone with same problem maybe doing exactly same things wrong.