The browser is always using ip address rather than domain name, how to fix it

i am using ojs3.

dns of the domain, e.g. is set to ip1,
ip1 is using nginx and is set to redirect to ip2.
ip2 is the server that hosts ojs installation.
the base_url in inc.php is set to be

when i browse, all pages are started with ip2, why not the
i tried to use browser F12 function, i find a 302 code, is this the problem?

Hi @yhangde

While I am not an nginx expert, you probably do not want to perform a client 302 redirect. If you must use two servers, you probably want to proxy internally. Your first domain resolves to:

host has address

Which is being 302 redirected to That’s a client side redirection, not a server side proxy. So the browser URL will change.


thank you
the problem is not solved, in order to continue to work, we cancelled the two servers’ configuration.