Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to protect a website with a password
#1

    How to protect a website with a password

How to protect a website with a password


  • To protect access to your website via username and password authentication, you will need to upload an .htaccess file and an htpasswd file to the root of your FTP account, using FileZilla or a similar FTP transfer software.
The .htaccess file will contain the path where the username and password authorized to access it are stored. It should contain the following code:

AuthType Basic
AuthName "Authentication name"
AuthUserFile /var/www/Mydomain.com/htdocs/.htpasswd
Require valid-user


The term Mydomain.com should be replaced by your domain name.

  • The .htpasswd file will contain the user name authorized to connect as well as its password, which will be encrypted. The creation of the .htaccess and .htpasswd file can be done via a text editor such as Notepad.

Information: the .htaccess and .htpasswd files are hidden files, so it is possible that when you make an FTP connection via an FTP transfer software, you do not see them. In this case, it will be necessary to display the hidden files on your software.



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)