Skip to main content
1-Visitor
April 15, 2011
Question

Changing Windchill URL

  • April 15, 2011
  • 8 replies
  • 13050 views

Hello gurus,

Our customer wish to change the URL of their Windchill environement, is there any way to avoid the "Reinstallation + Rehosting" cycle ? Are you aware of any procedure that could allow me to perform this operation ?

Thanks in advance

Cheers

8 replies

1-Visitor
April 15, 2011

Rehost has three scenary , and one match yours.

1-Visitor
April 15, 2011

David,

This is all theory, and I have been wondering the same thing myself for sometime. Going to think outloud here for a moment.

  • Windchill is a web based application running on Apache / Tomcat
  • Apache can host more than one website if configured properly
  • One site is apache can be setup to accept more than one host header / virtual host per site (IIS / apache)
    • In order for this work the URL needs to be setup correctly in DNS

    • With the host header setup properly apache doesn't care what URL is being passed. It just wants to feed up the web content / application

I have two test Windchill environments. I am going to test this out, and let you know my findings.

Stay tuned!

Patrick

1-Visitor
April 15, 2011

I did the following:

Created a new A record in DNS that pointed to the IP address of my Windchill test server.

Updated the DNS records on the DNS server.

Flushed the DNS on my local machine.

Waiting until I got a pint response with the new host name (A record that was created in the first step).

Launched IE / Firefox, and entered http://newhostname/Windchill.

Windchill launched, but after it loaded it reverted back to the original hostname because Windchill's configurations

Would this be an acceptable work around for your client?

- Patrick

1-Visitor
April 20, 2011

Patrick,

Your correct, you can use Apache to change the hostname of the Windchill application without executing a rehost. The issue you ran into was Windchill giving you a redirect back to the installed URL. You need to change the URL in both Apache and Windchill. We've found the easiest way to do this is by using the Apache Reverse Proxy feature and changing a few settings in Windchill. A second instance of Apache is required to run the Reverse Proxy, which can be installed on same system as Windchill or a separate server.

The communication will be as follows:
Client <-> Reverse Proxy Apache <-> Windchill Apache <-> Windchill Tomcat

Example: Apache installed on different servers both listening on port 80:
Installed URL: windchill.olddomain.com
New URL: wc.newdomain.com

1) Install a second Apache server (ie the Reverse Proxy Apache) - If you install the reverse proxy Apache on the same server as Windchill be sure to change the Listen line on the Windchill Apache service in the httpd.conf file and specify a different IP or port to bind too (eg 8880). If you define a different port you'll also need to change all urls below referencing http://windchill.olddomain.com to include the port (eg. http://windchill.olddomain.com:8880).

2) Configure the Reverse Proxy Apache server
a)Uncomment or add the following modules to the httpd.conf file:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so

b) Added the Proxy settings for the Windchill application and Windchill Help to httpd.conf
ProxyPass /Windchill/ http://windchill.olddomain.com/Windchill/
ProxyPassReverse /Windchill/ http://windchill.olddomain.com/Windchill/
ProxyPass /Windchill-WHC http://windchill.olddomain.com/Windchill-WHC
ProxyPassReverse /Windchill-WHC http://windchill.olddomain.com/Windchill-WHC

3) Update Windchill to use Reverse Proxy:
xconfmanager -s wt.rmi.clientSocketFactory=wt.boot.WTRMIMasterSocketFactory -t codebase/wt.properties
xconfmanager -s wt.rmi.serverSocketFactory=wt.util.WrappedRMISocketFactory -t codebase/wt.properties
xconfmanager -s wt.rmi.javarmicgi=servlet/JavaRMIServlet -t codebase/wt.properties
xconfmanager -s wt.server.codebase=http://wc.newdomain.com/Windchill -t codebase/wt.properties
xconfmanager -s com.ptc.core.ca.co.client.doer.task.default.repository=windchill.olddomain.com -t codebase/wt.properties
xconfmanager -s wt.httpgw.mapCodebase=http://windchill.olddomain.com/Windchill -t codebase/wt.properties
xconfmanager -s wt.federation.rpc.endpoint=http://windchill.olddomain.com:18080/Windchill/servlet/RPC -t codebase/wt.properties
xconfmanager -p

4) Add the following to %WT_HOME%/codebase/urlmap.properties files
wtcore/=http://wc.newdomain.com/Windchill/wtcore/
servlet/=http://wc.newdomain.com/Windchill/servlet/
wt/=http://wc.newdomain.com/Windchill/wt/
com/=http://wc.newdomain.com/Windchill/com/
netmarkets/=http://wc.newdomain.com/Windchill/netmarkets/
wtx/=http://wc.newdomain.com/Windchill/wtx/
tx/=http://wc.newdomain.com/Windchill/tx/
infoengine/=http://wc.newdomain.com/Windchill/infoengine/

5) Restart all services and enjoy your new URL!

The Advanced Deployment Guide has additional information on Reverse Proxies.

http://www.ptc.com/WCMS/files/78982/en/WCAdvDeployGuide.pdf

We've wrapped the commands above into a script that allows us to change the name of Windchill to anything in a few seconds. This comes in very handy when you need to clone a Windchill system and don't want to deal with a full rehost.