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 8459519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:21:11+00:00 2026-06-10T13:21:11+00:00

I’ve got a 10 year old Apache server (FreeBSD) where the following works: File1.htm

  • 0

I’ve got a 10 year old Apache server (FreeBSD) where the following works:

File1.htm

<!-- #set var="myDir" value="/dir" -->

File2.htm

<!-- #include virtual="File1.htm" -->    //sets myDir
<!-- #include virtual="${myDir}/File3.htm" --> //loads /dir/File3.htm

File3.htm

<!-- #include virtual="${myDir}/File4.htm --> //loads /dir/File4.htm

On a very recent Suse Linux with the latest Apache, it seems that
myDir is not defined in File3.htm, and thus it can’t find and load File4.

So File2 can load File3, but File3 fails to load File4. It works in the 10-year old Apache on FreeBSD, but not on a recent Apache on Linux….

Any ideas?

EDIT For completeness’ sake, this is basically the config file:

DocumentRoot "/srv/www/htdocs"
<Directory "/srv/www/htdocs">
        Options Includes
        AddType text/html .htm
        AddOutputFilter INCLUDES .htm
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>
  • 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-10T13:21:12+00:00Added an answer on June 10, 2026 at 1:21 pm

    I’ve made a test on my Ubuntu 11.04 system (with Apache 2.2.17), and I’ve had no problems at all.
    Here are the files I’ve used:

    File1.htm (located in the same folder of File2.htm)

    <ul>
        <li>
            <p>Start File1</p>
            <!--#set var="myDir" value="/test/stackoverflow/ssi" -->
            <!--#echo var="myDir" -->
            <p>End File1</p>
        </li>
    </ul>
    

    File2.htm (located in the same folder of File1.htm)

    <!DOCTYPE html>
    <html>
        <head>
            <title>Apache SSI test</title>
        </head>
        <body>
            <ul>
                <li>
                    <p>Start File2</p>
                    <!--#include virtual="File1.htm" -->
                    <p><!--#echo var="myDir" --></p>
                    <!--#include virtual="${myDir}/File3.htm" -->
                    <p>End File2</p>
                </li>
            </ul>
        </body>
    </html>
    

    File3.htm (located in the “ssi” subfolder)

    <ul>
        <li>
            <p>Start File3</p>
            <p><!--#echo var="myDir" --></p>
            <!--#include virtual="${myDir}/File4.htm" -->
            <p>End File3</p>
        </li>
    </ul>
    

    File4.htm (located in the “ssi” subfolder)

    <ul>
        <li>
            <p>Start File4</p>
            <p><!--#echo var="myDir" --></p>
            <p><!--#echo var="DATE_LOCAL" --></p>
            <p>End File4</p>
        </li>
    </ul>
    

    This is my “.htaccess” file:

    Options +Includes
    AddType text/html .htm
    AddOutputFilter INCLUDES .htm
    

    And here is the output that I get by requesting the page “File2.htm” in my browser:

    • Start File2

      • Start File1

        /test/stackoverflow/ssi

        End File1

      /test/stackoverflow/ssi

      • Start File3

        /test/stackoverflow/ssi

        • Start File4

          /test/stackoverflow/ssi

          Thursday, 30-Aug-2012 21:45:57 CEST

          End File4

        End File3

      End File2

    You should also:

    • Check the permissions on all the .htm files and on the include folder (in your example should be the “/dir” folder), just to ensure that all the files are readable by the web server.
    • Check for errors in your Apache error log

    By the way, I suppose that the missing closing quote in your “File3.htm” is only a typo.

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

Sidebar

Related Questions

I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.