Tuesday, November 1, 2016

Change Magento Admin Domain (on Local)

Version: Magento 1.x

Change the admin domain. e.g. admin.mydomain.com


1. Add entry to hosts file e.g. admin.mydomain.com

2. Add entry to httpd-vhosts e.g.

<VirtualHost *:81>
    ServerAdmin admin@admin.com
    DocumentRoot "c:\mywebsite"
    ServerName admin.mydomain.com
    ErrorLog "logs/error.log"
    CustomLog "logs/access.log" common
<directory "c:\mywebsite">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted

3. Update Magento config as follows:

System->Configuration->General->Web->URL Options->Auto-redirect to Base URL = No

System->Configuration->Advanced->Admin->Admin Base URL->Use Custom Admin Path = Yes

System->Configuration->Advanced->Admin->Admin Base URL->Custom Admin Path = http://admin.mydomain.com/
*This is the full URL with “http://”, admin domain, slash at the end “/”.

4. Clear Magento cache.

5. Admin site is accessible here: http://admin.mydomain.com/admin/