proxy & mime type issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am running a site with a front end apache web server load balancing
between multiple backend mod_perl application servers.  I am using the
proxy, proxy_balancer, and proxy_http modules to do the load
balancing.  The load balancing is working fine, with the major
exception being that it serves all files as 'text/html' as oppose to
their proper mime type (css, jpg, js, etc...).

To ensure that the proxy is at fault I have attempted to retrieve
files of various types using wget through the proxy, and directly to
the application servers.  When going through the proxy all files are
served as 'text/html', but when connecting directly to an application
server I get the proper type returned.

I am running Apache 2.2.6 on a Linux server w/o mod_perl on the web
server, and Apache 2.2.6 w/ mod_perl (w/o proxy modules) on the
application servers.

The mime_module is loaded, and functioning correctly on the web
server.  All files that I serve directly off of the web server are
served with their correct mime type.  This issue only occurs when the
files come through the proxy.

I am guessing that I must have some kind of incorrect configuration,
because I haven't been able to find much on this from extensive
googling.  It doesn't seem to be a consistent problem...which makes me
think I'm doing something stupid.

My VirtualHost configuration for the web server is below.  I added the
indicated ProxyPass, and Alias directives in order to just get the
basic site css, and images loading correctly.  It is not my intention
to serve them off of the proxy web server though, assuming I can get
this working correctly...

<VirtualHost *>
    ServerAdmin server_admin@xxxxxxxx
    ServerName www.site.com
    ServerAlias site.com
    DocumentRoot /srv/www/
    ProxyRequests off

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

########################################################
#  I added this, and am serving the basic style sheet, and standard
#  images locally for the time being
########################################################
    ProxyPass /styleSheet !
    Alias     /styleSheet /srv/www/site/data/styleSheet
    ProxyPass /img !
    Alias     /img /srv/www/site/data/img
    ProxyPass /js !
    Alias     /js  /srv/www/site/data/js
    ProxyPass /logs !
######################################################

    ProxyPass /balancer-manager !

    ProxyPass / balancer://mycluster/ stickysession=BALANCEID nofailover=On
    ProxyPassReverse / http://app-01/handler/index.cgi
    ProxyPassReverse / http://app-02/handler/index.cgi

    <Proxy balancer://mycluster>
        BalancerMember http://app-01/handler/index.cgi  route=http1
        BalancerMember http://app-02/handler/index.cgi  route=http2
        ProxySet lbmethod=byrequests
    </Proxy>

    <Location /balancer-manager>
        SetHandler balancer-manager
        Order deny,allow
        Allow from localhost
    </Location>
</VirtualHost>


Thanks for the help,

- jon

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux