Apache mod_proxy to another server

Posted by trobrock on Server Fault See other posts from Server Fault or by trobrock
Published on 2010-06-18T17:41:38Z Indexed on 2011/01/07 4:55 UTC
Read the original article Hit count: 228

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

© Server Fault or respective owner

Related posts about apache

Related posts about ubuntu