I'm attempting to test the fundamental authentication module of apache httpd web server. For whatever reason after i switch it on, the browser cannot appear to even connect with the server. Particulars are below. any assistance will be appreciated.
OS: Mac OSX Apache/Mysql Browser: Safari
I've got a mysql db "mydb" storing account information inside a table known as "login". Password is encoded using SHA.
I've got a directory structure like
I wish to secure the key folder.
Within the httpd.conf I've the next lines
DBDriver mysql DBDParams "dbname=mydb user=admin password=myadminpasswd" DBDMin 4 DBDKeep 8 DBDMax 20 DBDExptime 300 <Directory "/Users/Myname/Sites/Secret"> # core authentication and mod_auth_basic configuration # for mod_authn_dbd AuthType Basic AuthName "My Server" AuthBasicProvider dbd # core authorization configuration Require valid-user # mod_authn_dbd SQL query to authenticate a user AuthDBDUserPWQuery "SELECT password FROM login WHERE username = %s" </Directory>
Following this I restart the apache httpd server. I am unable to even access http://localhost any longer. It provides the following error: Safari can’t open the page “http://localhost/” because Safari can’t connect with the server “localhost”.
I had been wishing to have the ability to access localhost although not http://localhost/~myname/Secret
Does anybody has any idea in regards to what went wrong?
In my opinion I'm able to access the key folder via http://mysername:mypasswd@localhost/~myname/Secret
Notes: I have taken steps that this is loaded in httpd.conf
Book your apache server logs and find out what errors you receive when restarting it using the auth switched on