Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Running SSI

by Anonymous Monk
on Oct 27, 2009 at 09:46 UTC ( #803403=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks. What do I need to do to enable SSI? I've added the required entries in httpd.conf file but SSI isn't working. My .shtml files are in the cgi-bin folder. Here's what my conf file looks like
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi- +bin"> AllowOverride None Options Includes Order allow,deny Allow from all AddType text/html .shtml AddHandler server-parsed .shtml </Directory>

Here's a simple code, is this correct?
<html> <head><title>Spain</title></head> <body> Today's date is <!--#echo var="DATE_LOCAL" --> </body> </html>

Replies are listed 'Best First'.
Re: Running SSI
by moritz (Cardinal) on Oct 27, 2009 at 09:50 UTC
    On Apache 2 this works for me:
    AddOutputFilter INCLUDES .shtml

    (instead of the AddHandler directive).

    Perl 6 - links to (nearly) everything that is Perl 6.
      Ok. I've tried adding AddOutputFilter also but it still isn't working. Can someone who has SSI enabled post their entire httpd.conf file?
        dude, this is way off - is this the apache help site?

        Make sure at some point you do load the include module..

        LoadModule include_module modules/
        In your Directory entry, likely for your /var/www/html if you don't host mult sites.. If you want to allow parsing in html as well as shtml files..
        AddOutputFilter Includes html
        And stop using windows.
Re: Running SSI
by scorpio17 (Abbot) on Oct 27, 2009 at 15:36 UTC

    Have you read the documentation?

    Common problems are usually due to file/directory ownership and/or permission settings (on unix). Since you're running on Windows (the 'C:' in your directory path was a dead give-away), there may be additional gotchas to watch out for - try google.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://803403]
Approved by moritz
[haukex]: You can put it in SOPW, but use <readmore> tags
[haukex]: Also you might want to label it "code review"
[haukex]: Unless you have specific questions, in which case SSCCE's are much better
[cbeckley]: Excellent, thank you.
[cbeckley]: CUFP is more appropriate for stuff that's finished^h^h^h^h more advanced state of completeness?

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2017-03-24 15:08 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (304 votes). Check out past polls.