logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to determine content type from Proxied Server
Author
andre.fischer



Joined: 31 Jan 2014
Posts: 8
Location: Canada, Toronto

PostPosted: Mon 30 May '16 15:43    Post subject: How to determine content type from Proxied Server Reply with quote

I'm using Apache 2.4.18 on a RHEL 6.6 platform as a Reverse Proxy to an Application Server. I've tried to configure mod_substitute using AddOutputFilterByType, but it never works. I suspect I don't have the correct content type specified.

How can I determine the content type of the various files that are being proxied thru Apache?

I've also read that some content can be inflated. How can I determine which files need to be deflated to ensure the substitution command will work?


Thank you!!

Andre Fischer.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sun 05 Jun '16 18:44    Post subject: Reply with quote

The backend server has to send the correct content type. If that isn't working you can override it. I had to do that for ttf files.

example
Code:

Addtype font/truetype .ttf
AddType image/x-icon .ico
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/php text/css text/js text/javascript text/javascript-x application/x-javascript font/truetype
    AddOutputFilterByType DEFLATE application/javascript application/rss+xml
    DeflateCompressionLevel 9
</IfModule>
Back to top


Reply to topic   Topic: How to determine content type from Proxied Server View previous topic :: View next topic
Post new topic   Forum Index -> Apache