Hi guys,
I am trying to create a login page using apache mod_auth_form to authenticate users. Once the user is authenticated he/she should be able to access the main page.
# my public directory: #
C:/webroot/
regtrack_newSG.php
# my protected directory: #
C:/webroot/myapp/
regtrack_studysiteone.php
# my password file:
C:/Apache24/passwd/passwords
# .htaccess file under the protected directory: #
AuthFormProvider file
AuthUserFile "C:\Apache24\passwd\passwords"
AuthFormLoginRequiredLocation /regtrack_newSG.php
AuthFormLoginSuccessLocation /myapp/regtrack_studysiteone.php
AuthType form
AuthName realm
Session On
SessionCookieName session path=/
SessionCryptoPassphrase secret
Require valid-user
# httpd config: #
LoadModule auth_form_module modules/mod_auth_form.so
DocumentRoot "c:/webroot"
<Directory "c:/webroot">
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
<Directory "c:/webroot/myapp">
Options FollowSymlinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
<Location /dologin>
SetHandler form-login-handler
AuthFormProvider file
AuthUserFile "C:/Apache24/passwd/passwords"
AuthFormLoginRequiredLocation /regtrack_newSG.php
AuthFormLoginSuccessLocation /myapp/regtrack_studysiteone.php
AuthType form
AuthName realm
Session On
SessionCookieName session path=/
SessionCryptoPassphrase secret
</Location>
# my login page (regtrack_newSG.php): #
<html>
<form method="POST" action="/dologin">
<b>Username:</b> <input type="text" name="httpd_username" value="" /><br>
<b>Password:</b> <input type="password" name="httpd_password" value="" /><br>
</TD></TR>
<TR><TD align=center>
<input type="submit" name="login" value="Login" />
</form>
</html>
## When entering an invalid user, it gives me this message: ##
"This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required."
## When entering a valid user, it gives me this message: ##
"The connection to the server was reset while the page was loading..."
# Apache Error log: #
[Fri Feb 13 08:46:59.346701 2015] [ssl:warn] [pid 7456:tid 440] AH01909: RSA certificate configured for OC.lacrn.LOCAL:8801 does NOT include an ID which matches the server name
[Fri Feb 13 08:46:59.487327 2015] [ssl:warn] [pid 7456:tid 440] AH01909: RSA certificate configured for OC.lacrn.LOCAL:8801 does NOT include an ID which matches the server name
[Fri Feb 13 08:46:59.491164 2015] [mpm_winnt:notice] [pid 7456:tid 440] AH00354: Child: Starting 64 worker threads.
I have no clue why it is happening. Can anyone help me?
Thank you.