Assign nginx port to a site in ERPNext

Setup ERPNext site for a particular port using ubuntu and nginx

change erpnext port to 81 using this command

For Port change, please turn off multitenancy.

bench config dns_multitenant off

bench set-nginx-port site-name 81

bench setup nginx

and then add new conf file insideĀ /etc/nginx/conf.d/

e.g

server {
listen 80;

 root /usr/share/nginx/www; #change this to your html location

 index index.html index.htm;

 server_name localhost;

 location / {

 try_files $uri $uri/ /index.html;

 }

}

and restart nginx

sudo service nginx restart