Struggling with multi site enablement

Hi,
looking for help to enable my second created site meeting.dev

Already running:
ubuntu 18.04 WSL, windows 10 Home
Site 1 : frappe.local - Production - version 12
frappe@LAPTOP-5F23F7J8:~/frappe-bench$ bench version
erpnext 12.1.5
frappe 12.0.15
fatal: not a git repository (or any of the parent directories): .git
meeting 0.0.1

site 2 : meeting.dev
installed with one app meeting (empty)

hosts file updated

I have followed below steps:

DNS based multitenancy
You can name your sites as the hostnames that would resolve to it. Thus, all the sites you add to the bench would run on the same port and will be automatically selected based on the hostname.

DNS based multitenancy mode is disabled by default, you can switch it on / off using the command,

bench config dns_multitenant on
To make a new site under DNS based multitenancy, perform the following steps.

Create a new site

bench new-site site2name

Re generate nginx config

bench setup nginx

Reload nginx

sudo service nginx reload

in a browser http://meeting.dev nothing showing, unable to connect message displayed.

any advice please

Above issue resolved and solution steps consolidated under below posts:

thx
Nofal

That’s not how sites work.

Essentially, multisite is created with a different port.

so if your original site is running under http://localhost/ for example, the second site can be accessed by using http://localhost:81/ by default

you can override the port number of the site by using bench --site XXXXXX set-nginx-port

I am sorry, please could you share the correct way to add new site from the beginning since not found any where.

second, currently localhost is not working but frappe.local is running.

thx

The steps that I do to create a new site:
-bench new-site “site-name”
-bench set-nginx-port “site-name” “port-number”
-bench setup nginx
-sudo service nginx reload
-bench - -site “site-name” install-app erpnext
Should work fine
In case you want to delete any site:
bench drop-site “site-name”

1 Like

You also can choose DNS multitenant. Just use my installation routine ERPNext DNS-Multitenant - disable recursion on the DNS Server - #4 by Curt.Beck