Multitenant setup

Hi,

I followed multitenant setup on Multitenant Setup · frappe/bench Wiki · GitHub

I want to test mutitenancy on erpnext.
I created site2 and installed erpnext inside then reload nginx, using dns based multitenancy.

When pointing through browser, it showed default site: site1.

Do I need subdomain/domain as hostname for each site?

How to setup the hostname for site2? Is it possible to setup like abc.com/site2? So all sites are managed under one domain-folders…without subdomain.

Please some guidances.

Tks

The way I have been able to set it up it would be site2.abc.com

But it also depends if you are using the port setup or not?

@wwalford,

No,I’m not using port setup. How to setup the subdomain to point to site2?

I use EC2, when I pointed to site2.ec2.xxxxx.amazonaws.com but it’s not available.

Tks

1 Like

You need to setup the site for your DNS (not tried using the EC2 domain as you mention above only done it with a registered DNS). So when you create a new site you should use:

bench new-site site2.ec2.xxxxx.amazonaws.com (or rather site2.abc.com if abc.com is your domain)
bench setup nginx
sudo service nginx reload

1 Like

Hi @wwalford,

When opened browser, site2.ec2.xxxxx.amazonaws.com is still not available.

Here’s what I did:
bench new-site site2.ec2.xxxxx.amazonaws.com
bench frappe --install_app erpnext site2.ec2.xxxxx.amazonaws.com
bench setup nginx
sudo service nginx reload

Any ideas?

Tks

Is your DNS_multitenant on?

sudo bench config dns_multitenant on

I have never tried using ec2.xxxxx.amazonaws.com I have only done it with route 53 and using a registered domain. I will try replicate your problem and let you know what if I can get it working.

DNS_Multitenant is on, but the page is still not available…

Hi @wwalford, have you tried to replicate this on aws ec2?

Tks

Hello. @wwalford

How did you setup multiple sites with a subdomain? I’m using google cloud and ubuntu 14.04.

Thanks

@Jonathan_Fanny_Lie Did you find any solution for this?

@Jonathan_Fanny_Lie I am also facing this issue. If you had resolved , Please update the solution here!

once dns multitenant is on, just point your domain A record to your VPS ip address

Yes @Jonathan_Fanny_Lie . After the dns multitenancy setup , I have point both my siteone.com and sitetwo.com . But in both sites i only able to access the siteone only. But I want to access the respective site in the respective url.

Could you please share your thoughts here!