An Entrepreneur, Coach, IT Consultant, Strategic Adviser, and a Traveler craving to explore and contribute to forming a better society.

Tuesday, August 19, 2008

Enabling HTTP Authentication in Apache

1 comment :

Keywords: HTTP, Apache, PHP, MySQL, htpasswd, Webserver, Authentication

Though it is a simple authentication, but we can somehow restrict unauthorized access.


Sounds good??? It should...

Catch the following steps to get this done.

Pre-Requisites:

1. Apache Webserver
2. htpasswd (password generator)

Steps:

1. Create a username/password file using htpasswd

# htpasswd -c password_filename user_name
New password:******
Re-type new password:******



2. Create a ".htaccess" in your www/root folder with the following contents

AuthType Basic
AuthName "Apache Admin Guide Authors"
AuthUserFile "/opt/lampp/bin/password_filename"
Require user user_name



3. Now try accessing to your webpage.

Ex: http://localhost/pagename.html


Need more info??? Here you go -->
How to Auth?

All the Best !!!!!

Keywords: HTTP, Apache, PHP, MySQL, htpasswd, Webserver, Authentication

I request you all to please Click Here to help the poor people.


Featured Blog Topics:

1 comment :

Unknown said...

Good one, not able to do with .htaccess, with |directory| worked like a gem.