Set up Magento backend on a separate node

Last modified by sashka_ua on Sun, September 4, 2011 14:19
Source|Old Revisions  

This is an old revision of the document!

That is article describes how to handle access to Magento backend, include how to set up backend on a separate node.

Version can be used for such set up: EE 1.10.X, EE 1.9.X, CE 1.4, CE 1.5 Separate node and different domain config will not work for: EE, CE 1.6

Change backend path entity

This will change name of path entity used to get access to backend.

Edit “app/etc/local.xml” and change

 # <frontName><![CDATA[admin]]></frontName>

to something you like

 # <frontName><![CDATA[hidden_path]]></frontName>

and then clear Magento cache in backend.

After that backend will be accessible through such URL:


Configure domain for backend access to the same node

If you want just set up different domain for your backend and use, for example, some VirtualHost related features like HTTP auth for your domain, access by IP, you can do this with “Custom admin path”.


it MUST be the same Magento installation with the same document root as for frontend. 
In other case it will break your Magento installation.


1. Set

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

2. Configure VirtualHost. You MUST ensure that Magento is accessible with your new domain. Suppose it’s “”.

3. Set

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

then set

"System->Configuration->Advanced->Admin->Admin Base URL->Custom Admin Path" to ""

That’s should be full URL with “http://”, admin domain, slash at the end “/”.

Now, backend should be accessible on URL

Configure backend on separate node

You can set up backend on a separate node. It can be useful if you actively work with backend, if you want to decrease indexing impact on frontend and so on.

1. You should set up shared cache Memcached+DB:

- install memcached ( and PHP memcache extension ( It should be accessible from both frontend and backend nodes.

- set such config in local.xml. Pay attention and change IP address of memcached server.

For EE up to and CE any version (For EE additional FPC config required).


Once shared cache got to work, do next

2. Export media directory with NFS.

When you upload product images on a separate server you should make them available in some way for frontend server. The best way is to share media catalog with NFS and mount it on a backend server in a document root.

there is some notices for permissions:

* use the same UID for running web-server (apache for instance). Default is “48” in RHEL * use idmapd to map any UID’s to single UID (RHEL: /etc/idmapd.conf)

Sample config “/etc/exportfs” for frontend. 48 is single web-user UID:


sample fstab mount options: /var/www/html/media nfs proto=udp,hard,bg,intr,noatime,rsize=32k,wsize=32k,noatime 0 0

Don’t forget enable run on boot “/etc/init.d/netfs” in RHEL

 # chkconfig netfs on

this will enable automount NFS share on boot.

3. (Optionally) Shared sessions

We should mention that shared sessions in memcache is recommended for such set up. For that you should set up second memcached and set such config in local.xml:


4. Set URL option in backend

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

5. Configure VirtualHost. You MUST ensure that Magento is accessible with your new domain. Suppose it’s “”.

6. Set custom URL in backend

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

then set

"System->Configuration->Advanced->Admin->Admin Base URL->Custom Admin Path" to ""

That’s should be full URL with “http://”, admin domain, slash at the end “/”.

7. Cron set up

You should run cron only on backend server. Normaly it should run every 5 minutes:


*/5 * * * * /bin/sh /var/www/html/

Now, backend should be accessible on URL” located on a separate server.


Remember keep your code in a synchronized state on nodes frontend and backend. 
If you install something in Magento you should copy modules, updates to other node. 

A good way to do that is set up rsync for code, for example from backend to frontend.
Also it can be done with NFS, but it's not recommended!

Fix broken backend access

Once something went wrong and you cannot get access to admin anymore you can back everything with such steps:

You should delete changed options from database (you are doing this on your own risk!!!):

SELECT * FROM core_config_data WHERE path LIKE "%url%";

Then find config_id of your added custom admin URL options. It can looks like

 | config_id | scope| scope_id | path                                      | value                                    |
 |         4    | default |               0 | web/unsecure/base_url    |  |
 |         5    | default |               0 | web/secure/base_url        |   |
 |        14   | default |               0 | admin/url/use_custom     | 1                                             |
 |        15   | default |               0 | admin/url/custom             | |
 |        16   | stores   |               0 | web/secure/base_url       | |
 |        17   | stores   |               0 | web/unsecure/base_url   | |
 |        26   | default |               0 | web/url/redirect_to_base | 0                                             |

Locate there pathes “web/secure/base_url” and “web/unsecure/base_url” with scope “stores” and your wrong custom admin URL. Then use their config_id to delete this options

DELETE FROM core_config_data WHERE config_id=FIRST_ID_HERE;
DELETE FROM core_config_data WHERE config_id=SECOND_ID_HERE;

And them

DELETE FROM core_config_data WHERE scope="stores" and scope_id=0 and 
UPDATE core_config_data SET value=0 WHERE path="admin/url/use_custom";
UPDATE core_config_data SET value="" WHERE path="admin/url/custom";

Then clean cache.

This can be done with removing “var/cache” directory when you use cache in files

Or restart memcache if you use it.


Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs