I want to put some stuffs online for only my friends. I don’t want that anybody else gets access to them. I know that this is possible, but as I am completely a non technical person and have very little knowledge about computers I can not provide my website a password protection. Can you please tell me the way of making my website password protected? Oh Sorry I forgot to mention that my website run on Apache Web Server.
Is the Process Simple?
You have more than one option for making your website password protected. Some are simple and some are tough. As you have told that you are not a technical person, the simpler processes will suit you more. So, let us discuss one of the simple methods for making your website password protected.
Elaborate a Simple Process for me.
You have told that your website runs on Apache Web server. This is the most common server for websites. You the use in-built Apache’s file accessing commands for protecting any of your directories. The config file of Apache, i.e. httpd.conf, carries information about all the directories of your website. You can easily alter this file. Restart Apache every time you modify the configuration. Luckily, you can configure the Apache for checking all the directories. Changes made to the directories are employed every time the Apache uses the directory.
Another thing you may need to do is modifying the httpd.conf files, for enabling this directory control. You can enable the .htaccess file through the system administrator or, when you can access the config file yourself, put in the lines given below into the directories, with the .html files.
After that you will have to restart the Apache. This will inform the server to perform a complete directory check of public_html along with all the subdirectories for the access-control file. The name provided by default to that file having access-control is .htaccess. This file reads as:
Use the term “valid user” for allowing anybody in .htpasswd file for logging in. If you want more security than this, you will need to have a definite user name for example, “damson link”, which will keep all the others out. M
You will have to ensure that the .htaccess file is world readable and to make it so, type the command below:
Now, finally you will require generating a password file, with the extension .htpassword. You can make use of this program, by typing:
You will get prompts for password. Then add some more names by the following command:
Now edit the .htpasswd file by any text to delete the users. After completing the process when you will try to enter the directory, you will require to type a password before logging in. Thus your website has become password protected.