running frappe behind a Nginx reverse proxy

Hello,
I’ve installed Frappe Framework on a virtual Ubuntu machine and accessed it from another machine in the local network using an NGINX reverse proxy. In this setup, I’ve pointed “frappevm.localserver” to “192.168.30.20:8000,” and I’ve also created the same site name (“frappevm.localserver”) in the Frappe bench.
Everything appears to be functioning correctly, but when I attempt to integrate it with Google and use a Google account for login, I encounter an issue. The return URL is “frappevm.localserver:8000,” which isn’t reachable from other machines within our LAN.
How can I resolve this port-related problem?
Thank you.

What is the address used by other machines in the LAN (if not frappevm.localserver:8000)?

Is your virtual machine running NAT mode (192.168.30.20 is not your LAN subnet)?

Is your NGINX proxy running on another machine in the LAN?

On your Frappe server VM, you can try adding the following to /etc/hosts:

127.0.1.1	frappevm.localserver

Something like this, other machine can access to frappe using same local domain name ( frappevm.localserver) but without port number 8000 ( for machine in the plan, frappevm.localserver will be return 10.10.10.20 as the IP )
image
Nginx reverse proxy is used to make accessible all VMs on DEV Machine for our LAN, it shows the site at 192.168.30.20:8000 at URL HTTP://frappevm.localserver)
I add 127.0.1.1 frappevm.localserver to frappevm,
In this case, every things goes well expect when I try to login using Google Account, it want to return to frappevm.localserver:8000 and this port number is not accessible in LAN