Define routes in respective module.config.php
files.
module1
'router' => array(
'routes' => array(
'v1_admin' => array(
'type' => 'segment',
'options' => array(
'route' => '/v1/admin[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]*',
),
'defaults' => array(
'controller' => 'Module1\Controller\Admin',
'action' => 'index',
),
),
),
),
),
module2
'router' => array(
'routes' => array(
'v2_admin' => array(
'type' => 'segment',
'options' => array(
'route' => '/v2/admin[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]*',
),
'defaults' => array(
'controller' => 'Module2\Controller\Admin',
'action' => 'index',
),
),
),
),
),