enableing server side includes

Posted on 2006-03-20
Last Modified: 2013-11-18
I just setup a new linux server and for some reason apache isn't allowing server side includes to work. how do I enable this?
Question by:battalion
    LVL 15

    Expert Comment

    You should look into your Apache configuration file (httpd.conf).

    Look for a line which starts:

    AllowOverride (...)

    AllowOverride controls which options the .htaccess in directories can override.  It can be set to All, or any combination of Options, FileInfo, AuthConfig and Limit.

    For example:

    AllowOverride All

    You can set this by default, or by individual VirtualHost containers.

    Additionally, the name of the .htaccess file is controlled by the AccessFileName directive;  typically, it's set as follows:

    AccessFileName .htaccess

    Author Comment

    below is the setup for my httpd.conf file.

    <Directory "/web/Intranet">
        AllowOverride All
        allow from all
        Options +Indexes

        DocumentRoot /web/Intranet    
        ServerName intranet
    LVL 15

    Expert Comment

    I'd put the AllowOverride All in the VirtualHost container, too.  Is there an AccessFileName directive?
    LVL 27

    Expert Comment

    did you enable

    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml

    in your httpd.conf, too? May be just uncomment both lines in your httpd.conf.

    Author Comment

    they are uncommented
    LVL 15

    Accepted Solution

    My apologies - clearly I read the question and then answered another.  You want server side includes to work.

    That requires not AllowOverrides (which is what enables .htaccess files), but the following:

    Options Includes

    Change your Options statement to:

    Options Includes +Indexes
    LVL 15

    Expert Comment

    I'm so glad to have helped - sorry for the initial miscue!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Suggested Solutions

    Preface In the first article: A Better Website Login System ( I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
    Shoutout to Emily Plummer ( for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now