How I can separate domain between Frontend and Backend?

Frontend: https://www.mycustomdomain.tld
Backend: https://backend.mycustomdomain.tld

But I want to use same database same source code. I want to protect backend URL base by security rules / vpn.

If you have any suggest please let me know.

Hi and welcome @programes,

One way to solve this: do not load the “Backend” or “Editor” modules for the public domains (eg: www.mycustomdomain.tld) using environment variables. If you configure the webserver to set the LOAD_MODULES environment variable for the frontend domains:

# Only provide a frontend

With this module unloaded, the route will not be registered and have no available backend. Likewise you can do the reverse for the backend environment

# Only provide a backend

I hope this helps. This works in theory but there may be some bugs involved, but we will be happy to fix them for you.


I will try to do it. Thank you @daftspunky.