Current procedure to change http port

Hi all, I’m hosting the virtual image on an existing web server using VirtualBox and forwarded client port 80 to host port 8080 to not conflict with the existing web server (using NAT networking in vb). I’ve been using the system for a while but noticed the “Complete Registration” button in new user emails uses port 80 instead of 8080, which makes me wonder what else might be affected by the port forwarding.

Is there a “right” way to do this? Should I configure erpnext to use port 8080 instead of using port forwarding? If so,is the following the correct procedure?

$ bench set-nginx-port erpnext.vm 8080
$ bench setup nginx
$ sudo service nginx reload

(and of course also change vb port forwarding to forward 8080 straight through)

Fwiw,

frappe@erpnext:~/frappe-bench$ uname -a
Linux erpnext 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:28:32 UTC 2016 i686 i686 i686 GNU/Linux

frappe@erpnext:~/frappe-bench/apps/erpnext$ git status
On branch master
Your branch is up-to-date with 'upstream/master'.

frappe@erpnext:~/frappe-bench$ bench version
erpnext 9.2.23
frappe 9.2.24

Thanks!
Dale

Webserver port is generally configurable in the nginx file. So if you are able to run now without errors you should be fine I think. Are you still unable to login after nginx changes to use the new port 8080?

1 Like

Thanks @Pawan for replying. There is one error for sure, the Complete Registration button in a new user email does not work (because the link is to http://dalescott.net/… instead of http://dalescott.net:8080/…).

Can you confirm if “bench set-nginx-port erpnext.vm 8080” is the correct way to change the port ERPNext is served on? Will ERPNext then change links in emails accordingly? If so I will try this and report the results.

1 Like

I followed my initial proposal and successfully changed the port from 80 to 8080. However, links embedded in emails sent by ERPNext did not change (i.e. they still did not specify port 8080).

Maybe you could raise a GitHub issue for the email links not changing according to port.

1 Like

Issue reported here when nginx port is changed the url link in the email welcome to register is not updated · Issue #17044 · frappe/erpnext · GitHub