I am using the proxy_balancer in Apache2 to proxy requests to a Rails application to my rails server on the port the application is running on. This is how its set up...

Rails Server Mongrel running on port 8000, when accessing the url directly to http://rails_server:8000 the site loads fine

Apache Server Conf file for the site:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName myserver.com
    ServerAlias application.myserver.com

    <Proxy balancer://application_cluster>
            Allow from localhost
            BalancerMember http://ip.to.server:8000 retry=10
    </Proxy>

    ProxyPass / balancer://application_cluster
</VirtualHost>

The problem I am having is going to http://rails_server:8000 works fine, but going to http://application.myserver.com Loads the right content, but is displaying all the HTML as text and not rendering it as html


Try adding

ProxyPassReverse / balancer://application_cluster

like Inigo said in his comment. Just below ProxyPass.

(wow just realized I'm over a year late with this post, "unanswered question" it is but I doubt the author ever comes back)