Creating a local proxy for ColdFusion development

If you have to develop behind a proxy server, you may have encountered the following problem;

The ColdFusion (JRUN) JVM settings allow one to specify a proxy server, allowing your local ColdFusion to connect to external public URLs. However there is no proxy by-pass options, so when configured your ColdFusion cannot connect to local URLs which are not resolved by the proxy server, i.e. local development servers.

The following solution uses Apache to create a local proxy server for your local ColdFusion to use;

Apache Setup

  1. Enable mod_proxy for Apache by un-commenting the following modules to load in your httpd.conf file. If you do not have the mod_proxy module, then you will need to install it.
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so  (required for cfhttp)
  2. Add the following virtual host configuration to your local httpd-vhosts.conf file
    # Local Proxy for ColdFusion
    Listen 8080
    <VirtualHost *:8080>
        DocumentRoot D:\InetPub\wwwroot
        ServerName localhost
    
        ProxyRequests On
        ProxyVia On
    
        ProxyRemote * http://your-proxy-server:8080
    
        NoProxy .local 192.168
    
    </VirtualHost>
  3. Restart Apache

ColdFusion Setup

  1. Edit ColdFusion (cfusion) JVM settings in your local JRun4 admin (or CF Admin for non JRun install) to add the following proxy setting
    -DproxySet=true -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8080
  2. Restart cfusion instance

2 Responses to “Creating a local proxy for ColdFusion development”

  1. Laurie Carlin Says:

    Thanks for this post, answers a bunch of questions I was having.

  2. Proxy Lists Says:

    Anonymous proxy is the sefest proxy around in the world.It has huge features to protect your privacy. You can faster browsing speed through disable java scripts.


Leave a Reply

Copyright © 2005, David Beale

  • Valid XHTML 1.0!
  • Valid CSS
  • Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0