portal entry

select a category, or use search below
(searches all categories and all time range)
Title:

ColdFusion 2016 Distributed mode Apache web server

| View in Portal
January 31, 2019 01:00:48 PM GMT
4 Comments
<p>Hello, We are running two Red Hat 7 servers, one to run CF 2016 (Server A) and one to run Apache 2.4.6 (Server B). I’ve read instructions on how to get CF to run in distributed mode, but I’m not having any luck getting it to work. Is there a walkthrough on how to go about it? I’ve installed CF on the Apache server (Server B) to get the connectors set correctly, and changed the workers.properties file to point to […]</p>
<p>The post <a rel="nofollow" href="https://coldfusion.adobe.com/2019/01/coldfusion-2016-distributed-mode-apache-web-server/">ColdFusion 2016 Distributed mode Apache web server</a> appeared first on <a rel="nofollow" href="https://coldfusion.adobe.com">ColdFusion</a>.</p>
Labels: ColdFusion 2016, Question, Websocket, 2016, coldfusion 2016, question, websocket

Comments:

If it will help - I can give you the instructions for installing CF in Distributed Mode for IIS, and you can translate that to how that applies to Apache.
Comment by Benjamin Reid
1614 | January 31, 2019 11:45:50 PM GMT
That would be fantastic!! Thank you!
Comment by peteg46378198
1616 | February 01, 2019 12:56:42 PM GMT
I understand you have asked for the process using Linux/Apache, so you will need to translate the steps below from Windows/IIS speak into Linux/Apache speak, but it should at least give you a better idea of what is necessary. I would also recommend contacting the ColdFusion Support Team for help with this on <a href="mailto:CFsup@adobe.com" rel="nofollow">CFsup@adobe.com</a> I hope this post helps though. Installing ColdFusion 2016 in Distributed Mode under Windows/IIS: <ol> <li>Install IIS (and URL Rewrite) on the Distributed Web Server</li> <li>Install Visual C++ 2012 x64 Redistributable on the Distributed Web Server</li> <li>Install IIS (and URL Rewrite) on the ColdFusion Server</li> <li>Install ColdFusion 2016 on the ColdFusion Server</li> <li>Run the Web Server Configuration Tool on the ColdFusion Server: but add the connector <strong>using the IP address</strong> of the ColdFusion Server for the "AppServer Host:" instead of using "localhost" - for example:  192.168.0.123 The resulting <em>workers.properties</em> configuration file that stores the AppServer Host and Port numbers will be copied from the ColdFusion Server to the Distributed Web Server as part of the next step.</li> <li>Copy the following directories from the ColdFusion Server to the EXACT same location on the Distributed Web Server <ol> <li>C:\ColdFusion2016\config</li> <li>C:\ColdFusion2016\cfusion\wwwroot\cf_scripts</li> </ol> </li> <li>Open IIS on the ColdFusion Server and configure website as you normally would. These are the files that CF will use to process the requests routed from the Distributed Web Server. At this point the website should now be working correctly when accessed directly from the ColdFusion Server. Continue on to configure the Distributed Web Server...</li> <li>Open IIS on the Distributed Web Server and repeat the step above using the EXACT same file paths. These are the files that IIS will use to actually serve the content (request) and then forward to the CF server for processing then send back the resulting response. Don't forget to create the special Virtual Directories for: <em>jakarta</em> and <em>cfscripts</em> (as per the website on the ColdFusion Server). If you are using ColdFusion WebServices, you will also need to create the special Virtual Directory for <em>cfws</em>. Otherwise requests to these locations will not be passed through to the CF Server and will result in a 404. NOTE: It is critical that the websites on the ColdFusion Server and Distributed Web Server are created exactly the same using the same file paths, etc.</li> <li>On the Distributed Web Server, configure the following: (NOTE: the <em>…\wsconfig\<strong>1</strong>\…</em> assumes that only one Web Server Connector exists on the ColdFusion Server, otherwise the number can change to 2/3/etc) <ol> <li>Handler Mappings - "Edit Feature Permissions" - Allow Execute</li> <li>Handler mappings (Add Script Map...) for the required extensions: <ol> <li>cfcHandler - *.cfc - C:\ColdFusion2016\config\wsconfig\1\isapi_redirect.dll</li> <li>cfmHandler - *.cfm - as above</li> <li>cfmlHandler - *.cfml - as above</li> <li>cfrHandler - *.cfr - as above</li> <li>cfswfHandler - *.cfswf - as above</li> <li>hbmxmlHandler - *.hbmxml - as above</li> <li>ISAPI-dll - *.dll - IsapiModule (this File Module Mapping should already exist)</li> <li>StaticFile - *.* - StaticFileModule,DefaultDocumentModule,DirectoryListingModule (this File or Folder Module should also already exist)</li> </ol> </li> <li>ISAPI Filters <ol> <li>tomcat - C:\ColdFusion2016\config\wsconfig\1\isapi_redirect.dll</li> </ol> </li> <li>ISAPI and CGI Restrictions <ol> <li>tomcat_All - C:\ColdFusion2016\config\wsconfig\1\isapi_redirect.dll (Allow extension path to execute)</li> </ol> </li> </ol> </li> <li>Ensure the Application Pool on the Distributed Web Server has the same settings as the one on the ColdFusion Server</li> <li>On the Distributed Web Server, configure the relevant Windows Security Permissions (ACLs) for the Application Pool identity (e.g. IIS_IUSRS or IIS AppPool\{AppPoolName}) for the following locations: <ol> <li>C:\ColdFusion2016\config\wsconfig - Read, Execute (RX)</li> <li>C:\ColdFusion2016\config\wsconfig\1\isapi_redirect.log - Read, Write (RW)</li> <li>C:\ColdFusion2016\config\wsproxy - Read, Execute (RX)</li> <li>C:\ColdFusion2016\cfusion\wwwroot\cf_scripts - Read, Execute (RX)</li> <li>C:\Path\YourWebsite - Read, Execute (RX)</li> </ol> </li> <li>On the ColdFusion Server, add an Inbound Traffic Rule in Windows Firewall for the ColdFusion AJP Connector Port (usually 8016, but can be found in <span>C:\ColdFusion2016</span>\cfusion\runtime\conf\server.xml under <em>AJP/1.3</em> protocol and <span>C:\ColdFusion2016</span>\config\wsconfig\1\workers.properties under <em>worker.cfusion.port</em>)</li> <li>Restart the services for "Windows Process Activation Service" and "World Wide Web Publishing Service"</li> <li>Confirm everything is now working. The website should be working correctly both when accessed directly from the ColdFusion Server and also from the Distributed Web Server.</li> </ol> There are lots of potential pot holes along the way, and although the sequence of configuration steps can technically be altered and some steps event left out, we have found the above method works every time. Be aware that the ColdFusion Lockdown process can cause you issues here, particularly with the <em>requiredSecret</em> attribute (in server.xml and workers.properties files) that must be the same on both the ColdFusion Server and Distributed Web Server otherwise you get a 403 Forbidden Access is denied error. Firewalls can also cause issues here with the routed traffic - you can temporarily disable them during configuration and/or check the <em>isapi_redirect.log</em> file on the Distributed Web Server for additional error details in C:\ColdFusion2016\config\wsconfig\1\isapi_redirect.log. Another diagnosis tip is to check static resources are resolving on the Distributed Web Server, because if they are not then the dynamic ones likely also wont work. Good luck.
Comment by Benjamin Reid
1617 | February 04, 2019 12:54:13 AM GMT
Great stuff, Benjamin. You should create a blog post here out of that, for people who may not see it as the comment here.
Comment by Charlie Arehart
1618 | February 04, 2019 01:57:07 PM GMT