Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9311827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:28:16+00:00 2026-06-19T01:28:16+00:00

I’m experimenting with apache mod_include. I got two servers running apache: I’m trying to

  • 0

I’m experimenting with apache mod_include.

I got two servers running apache: I’m trying to include in my test_local.shtml (server1) some simple text from test_remote.shml (server2).

test_local.shtml:

<html>
  <head>
  <title></title>
  </head>
  <body>
    <!--#include virtual="http://www.server2.com/test_remote.shtml"-->
  </body>
</html>

test_remote.shtml:

<b>this is a test</b>

At first it didn’t work (got “File does not exist” error in error_log).
It looks like that for security reasons the only files I manage to include are on my local server (server1), with a local path, but not a remote url.
Then I understood that I needed to use mod_proxy (and mod_proxy_html) in combination with mod_include to make remote inclusion work.

So I added the following to my httpd.conf (on server1):

ProxyPass /server2 http://www.server2.com

Then I changed the include line in test_local.shtml to:

<!--#include virtual="/server2/test_remote.shtml"-->

No errors this time, something gets included, but the resulting text is all garbled:

 ‹³I²+ÉÈ,V¢D…’Ôâý$;.j¿è

Am I missing something in my configuration? What’s wrong?

UPDATE: I suspect it’s something about the way data is sent (and then read) between the two servers.. such as compression or similar. I checked mod_deflate configuration section, which is included and working in both servers, and it’s the same. Any idea? Thanks

UPDATE 2: disabling SetOutputFilter DEFLATE on server2, the text included with mod_include on server1 is perfectly readable. So that’s the source of the issue: how can I configure server1 to handle the gzipped content and display it correctly? (Hypotetically I’d imagine some sort of inputfilter opposed to outputfilter..)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T01:28:17+00:00Added an answer on June 19, 2026 at 1:28 am

    I found two solutions, but I prefer the second one because it doesn’t need to change the configuration of the remote server.

    Solution 1:

    By adding the following to the remote server configuration, we disable the gzip compression for .shtml files:

    <IfModule mod_deflate.c>
        SetEnvIfNoCase Request_URI \.shtml$ no-gzip dont-vary
    </IfModule>
    

    This is not the best solution for me, because I don’t have always access to the remote server from which I include contents.

    Solution 2:

    On the “local” server (the one hosting pages that use SSI inclusion), adding the following:

    ProxyPass /server2 http://www.server2.com/
    ProxyPassReverse /server2 http://www.server2.com/
    <Location "/server2/">
        RequestHeader unset Accept-Encoding
    </Location>
    

    Basically, I’m telling Apache to disable the Accept-Encoding request header; when requesting .shtml pages to the remote server, we ask the page without compression. Consequently, we get plain text, avoiding the garbled content.

    Further info: http://wiki.apache.org/httpd/ReInflating

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.