Install ERPNext DNS based Multi-tenancy, with these file structure

Usually, With DNS based multitenancy, I usually configure each ERPNext projects as:

http://erpnext.aaimaa.in/ and another http://sudomain.domain.com/. Each one has to be setup like this.
Now the question is: Can I change them as to reduce creating subdomains.

For example:
http://domains.aaimaa.in/erpnext1
http://domains.aaimaa.in/erpnext2
http://domains.aaimaa.in/erpnext3

If Yes, Please let us know. How?

@aaimaa

Not sure why you don’t want to create subdomains because it will save you from using specific ports for each domain you create. Therefore, to avoid constantly creating subdomains, you can setup wildcard subdomains for your domain *.aaimaa.in

Basically you would continue to setup your site as you normally would using bench and Nginx will take care of routing to the right subdomain.

This might help you a start:

http://nginx.org/en/docs/http/server_names.html#wildcard_names

Please note that I have not tested this. I have done wildcard domains in Apache and they work on the same principle. You also need to make sure that you have an entry in your DNS records indicating the wildcard domain where instead of name you would enter an asterisk “*” and in the IP part enter the IP you wish to point the wildcard domain.

Hope this helps

I’m already using the same you told above. Everything is perfectly working. In addition to that, I want to install ERPNext in Sub-Directory. Just like:

*.aaimaa.in/erpnext1
*.aaimaa.in/erpnext2

My concern is, with stickying same domain, by just changing Subdirectory only. Possible to install and use independent ERPNext environment without conflicting data from *.aaimaa.in/erpnext1 to *.aaimaa.in/erpnext2

Based on the Application Structure, Frappe & ERPNext as well as any other app you install, are common to all the sites, meaning one shared codebase. Am pretty sure its designed such so that one only have to maintain that one codebase.

If I understand correctly, you want each to have its own instance of ERPNext.

What I am unsure about with your desired configuration, Where do you see the conflicting data since each site created uses its own database.