Home  >  Article  >  PHP Framework  >  How to hide the admin login entrance in thinkphp6

How to hide the admin login entrance in thinkphp6

藏色散人
藏色散人Original
2021-12-21 11:02:433752browse

thinkphp6 method to hide the admin login entrance: 1. Modify the value of deny_module_list; 2. Change admin in admin.php to any random string.

How to hide the admin login entrance in thinkphp6

#The operating environment of this article: Windows 7 system, thinkphp v6 version, Dell G3 computer.

How to hide the admin login in thinkphp6?

ThinkPHP specific steps to hide the backend address

1. Modify the value of deny_module_list in application/config.php on the homepage, where the default There is already common, we add admin and change it to ['common', 'admin']

2. Then create a new admin.php in the public directory of the project and rename it admin_d75KABNWt. php, we can change admin in admin.php to any random string, the longer the better.

3. Log in to the backend. After the above modifications, we can no longer log in to the backend through www.test.com/admin. At this time, we can use www.test.com /admin_d75KABNWt.php, where admin_d75KABNWt.php is the name we can modify arbitrarily.

Note: Please protect your backend login entry and do not paste it everywhere. If there is a leaked backend entry, please try to modify it again.

Other security suggestions for ThinkPHP

Through the above hidden backend entrance address, we have added the first door. The following is for Everyone’s security suggestions will help us add more security protection to our backend.

1. Regularly modify the login entrance and super administrator password of the background management. The more complex the better.

2. Enable the background login verification code. How to enable it: modify login_captcha at the bottom of application/config.php and change its value to true

3. Modify the background super administrator username. Everyone is accustomed to using admin. It is recommended to change it to another name.

Recommended learning: "The latest 10 thinkphp video tutorials"

The above is the detailed content of How to hide the admin login entrance in thinkphp6. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn