0

I have moqui running on system1 which is accessible using URL http://localhost:8080/Login. Trying to access it from other system2 (in network) with URL replacing 'localhost' with the IP of first system; it shows the first (log-in) page, but afterwards, when submitting the pages from system2, the IP in URL automatically gets changed to 'localhost'. I have looked in to the book and also searched in framework code but couldn't find something related to this.

What could be the cause of this, is there any setting in app to fix this?

Nitin
  • 326
  • 4
  • 11

1 Answers1

3

There are two parts to configuring hosts and ports for a webapp. One is is for the servlet container so it knows what to listen to and the other is in Moqui Framework itself so it knows what to use when generating URLs. It sounds like the issue you are having is with the second, with URL generation.

In your runtime Moqui XML Conf file there should be a webapp element somewhat like this one from the MoquiProductionConf.xml file:

<webapp name="webroot" http-port="" http-host=""
        https-port="" https-host="" https-enabled="false"
        content-prefix-secure="" content-prefix-standard="" cookie-domain="">
    <root-screen host=".*" location="component://webroot/screen/webroot.xml"/>
</webapp>

When no @http-host/etc attribute is specified the values from the HttpServletRequest object will be used. These will vary depending on the settings of the servlet container you are using to deploy Moqui Framework.

To set it to something explicit you can use the http-host and if needed the https-host, http-port, and https-port attributes. For virtual host support the http-host and https-host attributes should be empty and the servlet container (and any proxy/etc in front of it) should be configured to pass through the hostname requested.

David E. Jones
  • 1,721
  • 1
  • 9
  • 8