What can I do to secure all web pages in a directory?

Please use the browser control panel interface for password protecting your web pages.

Or via telnet, if your home directory is yourlogin, create a file named .htaccess in your web directory that contains the following:

AuthUserFile /home/yourlogin/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic

require user pumpkin


Then in your home directory, type htpasswd -c .htpasswd pumpkin. By doing so it will enable you to secure the directory so that only user pumpkin can enter this directory.

You may well want any of the user/password combinations you created in your .htpasswd file to allow access. Just say require valid-user instead of require user xxx in .htaccess and any of the users you created will be able to access the files.

Make sure that you store the .htpasswd file in your home directory hidden from others. The one drawback to putting your .htpasswd file in your home directory is that you will have to slightly lower the security of your home directory. Go to /home and type chmod +x yourlogin. The web server needs execute permission on to read the .htpasswd file.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What does Realtime Blackhole List (RBL) mean?

RBL is short term use  for Realtime Blackhole List, a list of IP addresses whose owners...

Why formmail scripts I have uploaded shows 403 Forbidden error?

The old versions of formmail scripts was not secure enough so we had to put block on the scripts...

How to use SSL security on a webpage or form?

Access the webpage form that you want to be secure via the secure server. The images in the...

What can I do to secure all pages in a cgi-bin directory?

If you do not want other people to read your scripts under all circumstances, end your CGI...

How can I create a secure ftp directories?

To make a directory named direct that can only be accessed by userid fred, go to the directory...