Multitenant Multibench Setup

I want to setup multiple sites on same hosting/server.
Bench-1
site1.com
site2.com
Bench-2
site3.com
site4.com

I’m trying with “bench config dns_multitenant on” in both bench directories, however it’s not working as expected. Please guide me on this.

From ‘.com’ I assume you are asking for production environment
Follow this guide and the page after (for production)

https://docs.frappe.io/framework/user/en/bench/guides/setup-multitenancy

1 Like

It’s not actully planned as Production. I’m planning like bench-1 will be Production and Bench-2 will be development.

I tried with given document, however for second domain in bench-1 it’s giving 404 not found error.

Did you create DNS records for domains pointing to your production server? Did you regenerate and reload Nginx after adding your domains to your bench? Did you try accessing with http vs https incase you did not setup ssl correctly?

For development bench I dont recommend having it on the same server as your production, you can use my script to quickly spin up a development environment with docker

Yes I have set DNS records for domains. I have executed following steps.

  1. bench config dns_multitenant on
  2. bench new-site site1.com
  3. bench setup nginx
  4. sudo service nginx reload

Same steps for site2.com. However unable to access site2.com

I’ll try “FrappeDev”

I did bench config dns_multitenant off and on again…so now it’s started working as expected.