1 Reply Latest reply on Feb 25, 2016 10:09 AM by aanjan RSS
    smonteil Newbie

    How to configure Thingworx/Tomcat with custom domain name

    Hello,

     

    We have a ThingWorx server that we currently access through its IP address.

    In order to replace the IP address with our custom domain name, we have configured the DNS and the new configuration works fine when entering the url (with custom domain) in the web browser. However, the domain name is immediately replaced by the server IP Address in the client web browser.

     

    In order to fix this, we have tried to configure a new virtual host in the server.xml file (Tomcat configuration), but this end up with various errors as described below.

    The new host entry in is like this:

    <Host name="mydomain.com" appBase="webapps" unpackWARs="true" autoDeploy="true">

           

            <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"

                   prefix="mydomain_access_log" suffix=".txt"

                   pattern="%h %l %u %t &quot;%r&quot; %s %b" />

    </Host>

     

    When calling http://mydomain.com/Thingworx, the browser is redirected to http://IP_ADDRESS/Thingworx and popups the user login. Then the Thingworx page is displayed, but the browser's URL field shows the IP address instead of our domain name.

     

    When calling http://mydomain.com/Thingworx/FormLogin/ORG_NAME with the same configuration, an HTTP 500 error is returned. Doing the same call with the IP works fine.

     

    We have tried several modifications on the vhost configuration, like setting appBase="webapps/Thingworx" or embedding a <context> section but without any success.

     

    Could you please provide some examples or guideline to properly configure Tomcat + Thingworx in order to display our domain name?

     

    Thank you for your help.

     

    Stephane