Multi Sites With Multiple Apps

Hi All,
I need to set the ERPNEXT in Multiple sites. Any one can help me with steps to access with VM as localhost.

Hi @rmehta I am not asking to do my work just asking steps to handle the multiple site. Because i have to work directly with live projects. I have been tried with first creating the new sites, and set that sites in nginx port of 82 then i install erpnext in that site and view the web page it shows blank page.

  1. bench new-site vas
  2. bench set-nginx-port vas 82
  3. bench setup nginx
  4. frappe --install_app erpnext vas
    Now when I access localhost:8080 Works it’s in site1.local
    when I access Localhost:82 shows blank page
    now i want to access both the sites with erpnext.

bench --site vas install-app erpnext

When Giving this command it shows this error.
frappe@erpnext:~/frappe-bench$ bench set-nginx-port vasantha 82
frappe@erpnext:~/frappe-bench$ bench setup nginx
frappe@erpnext:~/frappe-bench$ bench --site vasantha install-app erpnext
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands.py”, line 163, in install_app
_install_app(app, verbose=context.verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 92, in install_app
frappe.clear_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 416, in clear_cache
for fn in frappe.get_hooks(“clear_cache”):
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 703, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 47, in get_value
val = generator()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 671, in load_app_hooks
for app in [app_name] if app_name else get_installed_apps(sort=True):
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 656, in get_installed_apps
installed = json.loads(db.get_global(“installed_apps”) or “[]”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 641, in get_global
return self.get_default(key, user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 653, in get_default
d = frappe.defaults.get_defaults(parent).get(key)
File “/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py”, line 49, in get_defaults
globald = get_defaults_for()
File “/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py”, line 154, in get_defaults_for
where parent = %s order by creation""", (parent,), as_dict=1)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 105, in sql
self.connect()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 51, in connect
use_unicode=True, charset=‘utf8’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 193, in init
super(Connection, self).init(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, “Access denied for user ‘b297ff912e’@‘localhost’ (using password: YES)”)
frappe@erpnext:~/frappe-bench$

Hi,
See the post Demo App installation in multi tenancy mode
I had it working smoothly.
Both installations working fine in ports 80 and 82.

1 Like