title: How to setup reverse proxy in apache for play framework web app on mac os x
body: <p>I'm trying to add an apache front end with reverse proxy to a play framework app on port 9000. I've tried the following httpd configuration as per the play documentation: <a href="http://www.playframework.org/documentation/2.0.2/HTTPServer" rel="nofollow">http://www.playframework.org/documentation/2.0.2/HTTPServer</a></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
    ProxyPreserveHost On
    ServerName http://localhost
    ProxyPass / http://127.0.0.1:9000/
    ProxyPassReverse / http://127.0.0.1:9000/
    LogLevel debug
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I have loaded only the mod_proxy module, but have commented out all other proxy related modules (http, ajp, jk, etc).</p>
  
  <p>When I try to hit <code>http://localhost</code>, I get the following in the error log:</p>
  
  <pre><code>[debug] mod_proxy_ajp.c(45): proxy: AJP: canonicalising URL //localhost:8009/
  [debug] proxy_util.c(1506): [client ::1] proxy: ajp: found worker ajp://localhost:8009/ for ajp://localhost:8009/
  [debug] mod_proxy.c(1015): Running scheme ajp handler (attempt 0)
  [debug] mod_proxy_http.c(1963): proxy: HTTP: declining URL ajp://localhost:8009/
  [debug] mod_proxy_ajp.c(672): proxy: AJP: serving URL ajp://localhost:8009/
  [debug] proxy_util.c(1949): proxy: AJP: retrying the worker for (localhost)
  [error] proxy: AJP: disabled connection for (localhost)
  [debug] mod_proxy_ajp.c(45): proxy: AJP: canonicalising URL //localhost:8009/favicon.ico
  [debug] proxy_util.c(1506): [client ::1] proxy: ajp: found worker ajp://localhost:8009/ for ajp://localhost:8009/favicon.ico
  [debug] mod_proxy.c(1015): Running scheme ajp handler (attempt 0)
  [debug] mod_proxy_http.c(1963): proxy: HTTP: declining URL ajp://localhost:8009/favicon.ico
  [debug] mod_proxy_ajp.c(672): proxy: AJP: serving URL ajp://localhost:8009/favicon.ico
  [debug] proxy_util.c(1949): proxy: AJP: retrying the worker for (localhost)
  [error] proxy: AJP: disabled connection for (localhost)
  </code></pre>
  
  <p>When I use apachectl to see what modules have been loaded, I'm seeing this:</p>
  
  <pre><code>Loaded Modules:
   core_module (static)
   mpm_prefork_module (static)
   http_module (static)
   so_module (static)
   authn_file_module (shared)
   authz_host_module (shared)
   cache_module (shared)
   disk_cache_module (shared)
   dumpio_module (shared)
   reqtimeout_module (shared)
   ext_filter_module (shared)
   include_module (shared)
   filter_module (shared)
   substitute_module (shared)
   deflate_module (shared)
   log_config_module (shared)
   log_forensic_module (shared)
   logio_module (shared)
   env_module (shared)
   mime_magic_module (shared)
   cern_meta_module (shared)
   expires_module (shared)
   headers_module (shared)
   ident_module (shared)
   usertrack_module (shared)
   setenvif_module (shared)
   version_module (shared)
   proxy_module (shared)
   mime_module (shared)
   dav_module (shared)
   autoindex_module (shared)
   asis_module (shared)
   info_module (shared)
   cgi_module (shared)
   dav_fs_module (shared)
   vhost_alias_module (shared)
   negotiation_module (shared)
   dir_module (shared)
   imagemap_module (shared)
   actions_module (shared)
   speling_module (shared)
   alias_module (shared)
   rewrite_module (shared)
   apple_userdir_module (shared)
   bonjour_module (shared)
   authn_dbm_module (shared)
   authn_anon_module (shared)
   authn_dbd_module (shared)
   authn_default_module (shared)
   auth_basic_module (shared)
   auth_digest_module (shared)
   authz_groupfile_module (shared)
   authz_user_module (shared)
   authz_dbm_module (shared)
   authz_owner_module (shared)
   authz_default_module (shared)
   mem_cache_module (shared)
   dbd_module (shared)
   status_module (shared)
   proxy_http_module (shared)
   proxy_ajp_module (shared)
  Syntax OK
  </code></pre>
  
  <p>So both proxy_http and proxy_ajp are getting loaded even though I commented them out. I'm trying to use the apache (2.2.21) that came on my mac running osx lion. Any ideas on what is wrong here?</p>