Two months back i got requirement of do basic authentication for testing site server. So Google or any search engine site cannot index the testing sites.
We are using Fedora as Operating System and Apache as webserver on our testing machine. We hosted more than fifteen test sites on that server.
I successfully created basic authentication on server.
Use following commands:
#su
#ROOT_PASSWORD
#vi /etc/httpd/conf/httpd.conf
in that file you need to insert following lines.
AccessFileName htaccess.acl .htaccess# htpasswd -c /home/USER/pwd.txt USER(you can define your user of stystem.)New password: mypassword Re-type new password: mypassword
That sit. Your username and password is set for popup.
Now you need to only create or update your .htaccess file. You can create or find .htaccess file in your project folder.
Use or copy and paste following code in that file: (.htaccess file)
AuthUserFile /home/USER/pwd.txt
AuthName "Protected"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
I following exact method for my server and projects. It is working perfect for me.






This is a exceptional post, I found your site checking yahoo for a similar topic and arrived to this. I couldnt come across to much additional information and facts on this blog post, so it was good to discover this one. I will certainly end up being back again to look at some other articles that you have another time.
Im pleased I discovered this web site, I couldnt discover any knowledge on this matter before. Also run a niche site and for anyone who is ever serious in doing a bit of guest writing for me if possible feel free to let me know, i’m always look for people to check out my blog. Please stop by and leave a comment sometime!
This is a fantastic post, but I was wondering how do I suscribe to the RSS feed?
Interesting read, perhaps the best article iv’e browse today. We learn everyday cheers to you!
Of course, what a great site and informative posts, I will add backlink – bookmark this site? Regards, Reader
I was just having a conversation over this I am glad I came across this it cleared some of the questions I had.
Intriguing post. I have been searching for some good resources for solar panels and discovered your blog. Planning to bookmark this one!
Good! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?
I REALLY liked your post and blog! It took me a minute bit to find your site…but I bookmarked it. Would you mind if I posted a link back to your post?
I’ve just started off a blog, the knowledge you give on this site has aided me extremely. Thank you for all your time & work.