Change deployment structure of ERPNext in existing server

Hello,
I have a problem with installing ERPNext in my existing server (Ubuntu 14.04), with situations as follows:

  • Previously, I already have several sites deployed on that server, setup under /var/www/(site_name)/public_html/ with virtual hosts configured for each of those sites through /etc/apache2/sites-available/(site-name).conf
  • Initially, I want to install ERPNext and then set it up so that it can be accessed as subdomain of one of the previous sites (erpnext.site1.com), as I want people working in Site1 to use ERPNext in their operations.
  • I install the ERPNext using the install script for bench provided in the GitHub

The installation is successfully done, but now I can’t access any of the previous sites i’ve made. Whether I go to site1.com or site2.com for example, all said that page has been moved or missing and redirected me to the ERPNext login page.

My question is, ‘Is it possible to setup ERPNext in those kind of structures, as in having multiple site (normal site, not a bench/frappe site) under the same server?’

Several ideas that comes up to mind:

  1. Change the default bench server. Tried that with bench frappe --serve --port 8080 command, but no change whatsoever to the site. Still can’t access the other sites, and it seems the ERPNext still accessible under port 80.
  2. Uninstall ERPNext. … can’t seem to find documentation explaining how to do that. Some discussion said that it’s still being developed (dated back at Feb 2015), but find no updates on this issue.

Hope anyone can help, it’s kinda critical since the other site’s owners has started asking me of the situation. Thank you!

I have setup wordpress and erpnext on same machine.
I use nginx for both and it is working perfect.

have you configured previous sites on apache?

Hi Revant,
Yes, I’m using Apache to setup the previous two sites.

In your case with nginx, where did you specify where to install erpnext and/or the other sites?

Thanks.

/etc/nginx/conf.d/frappe.conf is a link to ~/frappe-bench/config/nginx.conf. This file is generated by command and takes care of the nginx configurations for frappe/erpnext

bench setup nginx

my other site is configured in /etc/nginx/sites-available/mysite.com.vhost
its link as /etc/nginx/sites-enabled/100-mysite.com.vhost

1 Like

Hmm, since I’m using Apache, I figured I should find something similar to your frappe.conf somewhere in /etc/apache2/conf-enabled/ or /etc/apache2/conf-available/, but I can’t seem to find any. But I still find the frappe.conf file under nginx folder. Does that mean that by using this I’m somehow change my webserver from Apache to Nginx? Or the ERPNext is actually running in Apache?

Thanks.

ERPNext runs on nginx.
Configure other sites on nginx, that’s what I did.

I don’t know how to configure ERPNext on Apache