I am trying to set up a multi-site architecture in Symfony 4 using multiple Kernels.
It would be too lengthy to post all of the changes I have made but I basically followed the Symfony docs for creating a new Kernel and the changes I made can be viewed in the following pull request.
When I attempt to run the api kernel locally (php bin/api server:run) I get the following error message:
I am simply trying to load the home controller and template using the new Kernel
# config/api/routes.yaml
home:
path: /
controller: App\Controller\Home::index

Place
routes.yamlunderconfig/routesdirectory, otherwise Symfony treats this file as a framework configuration file.Or you can reconfigure kernel to load routes files from
apidirectory by editigconfigureContainerandconfigureRoutesmethods ofApiKernel.