Built-in Website on a different subdomain?

Hi, we have a fresh ERPNext install on a subdomain (eg. https://erp.domain.com) using Domain-based multi tenancy with LetsEncrypt (using only only 1 domain & 1 bench).

We are wondering if it’s possible to set requests to the built-in Website area to be on a different subdomain (eg. (eg. https://www.domain.com) so that customers do not see the erp.* subdomain?

To clarify: I’d like to have multiple “Websites” (each with it’s own domain and content) served from one “Site” with only one Desk.

I can find multitenancy guides on setting up multiple [Desks/Tenants/Databases] as well as guides on setting up multiple [SSL Certs/Domains] for a single Site.

But nothing for a single [Desk/Tenant/Database] with multiple [Websites].

Not possible I take it?

You can achieve what you want with a reverse proxy like HAProxy and the set-path option. See for example:

This should also be possible with nginx, maybe also the one used by frappe already…

Good luck!

Thanks very much for responding @doca, appreciated!

Hmm I think that gets me part way there, I’ll try to explain it better with a conceptual example.

www.domain.com shows frappe-bench/site1/index.html
xyz.domain2.io shows frappe-bench/site1/index2.html
www.domain.com/index2.html gives a 404

…with site1 being a single Desk/Database.

Does that help explain it better?

I have almost the same situation.
Did you manage to deploy ERPNext as a subdomain while having an ERPNext website in the root domain? I’m asking as I’m trying to deploy ERPNext behind firewall where only selected people can access via VPN. But the front end website would be accessible by people outside the organization. therefore it should be accessible to anyone.Is that possible?

1 Like