Changing Host Name

I have read several posts explaining how to change the hostname (Related to faulty emailing of quotations, etc…).

When I follow the instructions to change my hostname, my ERPNext site won’t load and gives an error of “Internal Server Error”. This is what I have done:

  1. Added “host_name”: “http://domain.org” to …/sites/site1.local/site_config.json
  2. Bench Restart

After Bench Restart, the site gives the Server Error and won’t connect using http://domain.org. The connection using this URL was fine until I added hostname to the sit_config.json file. I can’t see where to view any logs.

More points about my setup… I installed ERPNext on Ubuntu 14.04 using the installation script and I have it in production mode. Also, this Ubuntu server is behind a reverse proxy server I am using for several servers in my network.

Is there a log somewhere I can check to see what is happening? The NGINX log is empty.

I had this same issue while back. When I installed my instance I used the default site1.local name, but noticed that emails that then come from the app use that as the URL.

What I did in another thread was to rename the sites\site1.local directory to sites\www.domain.com or whatever you want the real name to be. I then edited the config\nginx.conf file. You will see a collection of references to site1.local in many of the configuration directives. Rename all of them to www.domain.com. Then do a sudo service nginx reload and sudo service nginx resart. That should fix you up. Worked for me.

1 Like

@toddleish can u please check the site folder name? it should be domain.org

Ok, thank you! That works… I had tried this before, but I had also added the hostname in site_config.json. I see that this step is no longer necessary. If I had the hostname there, the site won’t run. Thanks again for your help!