Good day, trust everyone is having a good weekend
My server-
ERPNext V13.20.1
Frappe 13.20.1
Would like multitenant setup.
Commands to consider-
bench config multi-tenant on
bench new-site
bench --site [site] install-app erpnext
I read many docs on multitenancy but the one closest to what I want seem
Access to multitenancy is by domain not port. There are 2 alternatives:
Create the site the same name as the domain (and subdomain) name. e.g site1.mydomain.net and site2.mydomain.net ,
and/or (you can mix):
Add domain to the site with command
bench add-domain --site $SITENAME $DOMAINNAME
And if I’m not mistaken, you need to install nginx
bench setup nginx
Do above command after any change in domain or site name and reload.
bench setup reload-nginx
The site will be accessible via http an…
Here is what I want
Not sure if I understood @rahy in his post that I listed above, but the way I see
it I must-
bench config multi_tenant on
bench new-site electrical.myhardware.com
bench --site electrical.myhardware.com install-app erpnext
and then
bench new-site woodword.myhardware.com
bench --site woodwork.myhardware.com install-app erpnext
bench setup nginx
bench setup reload-nginx
Just want to confirm that I am correct before I try it.
Thank you Sir/Madam
rahy
February 20, 2022, 4:13pm
2
Yes you are correct.
But now I prefer to do the 2nd option:
bench new-site electrical.site
bench --site electrical.site install-app erpnext
bench setup add-domain --site electrical.site electrical.myhardware.com
the same for woodword.
and the same for bench setup nginx and reload it.
This way you can add more domain name to the same site without being confused with the site name, e.g you can add electrical.myhardware.net
Good day @rahy , trust you are having a great day
I understand what you are saying and thank you for your time.
Just some feedback @rahy …
Sir,
I implemented it yesterday … and all is good.
All that remains is for me to clarify how to implement encryption with letsencrypt.
I have done letsencrypt on a single instance … but now …with subdomains ??
But I do not want to have the thread split to another subject … I shall make another post.
Thank you Sir
Following doc cover suring site using LetsEncrypt or custom SSL for bench sites.
https://frappeframework.com/docs/v13/user/en/bench/guides/lets-encrypt-ssl-setup
Feel free to open another thread (optionally if) you don’t find solution from documentation or previous posts from this forum.