How to change the url of admin and how to safeguard it.
Please help me asap, any help will be appreciated.
Solved! Go to Solution.
@akashay _kc You can change the admin url from app/etc/env.php
There you find the below line of code.
'backend' => [ 'frontName' => 'admin' ],
Just replace admin with the text you want.
Make sure to choose the text which is not so common like admin because it will be easily hacked.
Thanks
@akashay _kc In the same file you can find 'session'.
Just replace that with the below line of code.
'session' => [ 'save' => 'files' ],
Thanks
@akashay _kc You can change the admin url from app/etc/env.php
There you find the below line of code.
'backend' => [ 'frontName' => 'admin' ],
Just replace admin with the text you want.
Make sure to choose the text which is not so common like admin because it will be easily hacked.
Thanks
Hello @akashay _kc
There are 3 methods to set custom Magento 2 admin URL and secure the admin panel:
via SSH
Run this command:
php bin/magento setup:config:set --backend-frontname="admin_path"
Manually
via Admin panel
After using one of the methods to change the admin URL in Magento 2, you can type the new admin URL and log in as usual.
I hope it helps you.
Thanks for prompt help @rahul Gupta , Its working!
However, can you please suggest me where to find the configuration to save session in files.
@akashay _kc In the same file you can find 'session'.
Just replace that with the below line of code.
'session' => [ 'save' => 'files' ],
Thanks