How to set a password when accessing a web page


Install phpMyAdmin When accessing to use after doing so, or putting a specific document on a website, there are cases where it is necessary to enter through a password.

Without installing a program that registers ID and password, you can simply enter the specified ID and password when accessing a specific page of the website as shown below.

 

phpmyadmin

 

Not exactly a specific page, but a specific directory.

When you try to access a file in a specific directory with your web browser, you will receive an ID and password.


How to set a password when accessing a web page

If the ID to be input is myid and the absolute path of the directory to which the password is to be set is /home/user/myid/, do as follows.

1. Create an .htaccess file in the directory you want to password, and save the following contents.
You only need to edit what is written in bold below.

AuthName “myid"
AuthType Basic
AuthUserFile /home/user/myid/.htpasswd
AuthGroupFile / dev / null

Require valid-user

 

 

2. 텔넷 After connecting to , move to the directory where you want to set the password, and create a password file with the following command.

htpasswd -c .htpasswd myid

 

 

<Enter the password>

 

 

 

 

It's all over.

When accessing the URL with a web browser, a window asking for an ID and password appears, enter myid and the entered password.

Install phpMyAdmin After that, it is good to set the password in the same way as above.







Recommendations





0 If you like the article, please click the heart~ It will be a strength to bloggers (SNS/login/advertising is not related)



Articles you might like







Health to Calendar

Import your Apple health records into your calendar events and view your health records chronologically on your calendar












4 Comments

Add a Comment

Email addresses are not disclosed. Required items *is indicated by

























This posting is part of Coupang Partners' activities, and a certain amount of commission is provided accordingly.