Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2001 19:38:15 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        Wyatt Banks <banksw@fang.cs.sunyit.edu>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Apache Server Question
Message-ID:  <Pine.BSF.4.21.0105141931200.55236-100000@ren.sasknow.com>
In-Reply-To: <Pine.BSF.4.21.0105141755560.87667-100000@fang.cs.sunyit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Wyatt Banks wrote to questions@FreeBSD.ORG:

> Not trying to post off topic, but I saw several of these in the mail
> archives on the FreeBSD site, so I thought I'd ask and see if anyone
> figured it out yet.  I'm wondering if anyone has figured if it is
> possible to use server side includes (SSI) with Apache.  

Yes, SSI and Apache are a close knit family :-)  Out of the default Apache
install in 1.3.x (including 1.3.12), just create your virtual host record,
like this:

<VirtualHost 192.168.0.1>
	ServerAdmin	somebody@somedomain.com
	DocumentRoot	/home/somebody/public_html/
	ServerName	www.somedomain.com
	ServerAlias	somedomain.com

<Directory "/home/somebody/public_html/">
	AllowOverride	None
	Options		Includes
	Order		allow,deny
	Allow from all
</Directory>

</VirtualHost>

Also of use in Options is IncludesNoExec, which allows SSI, but not the
potentially insecure #exec cgi and #exec cmd.

Name your files with the extension .shtml or .shtm, or SSI won't work.

SSI will not work within CGI output.

Make sure your directives are keyed correctly (spaces are important! SSI
is *very* picky). This works:

<!--#include virtual="filename" -->


These (and some others) do NOT:

<!-- #include virtual="filename" --> IS WRONG
<!--# include virtual="filename" --> IS WRONG
<!--#include virtual="filename"--> IS WRONG


Load your pages in a browser. Are your directives still there? Or did they
get parsed?

Hope this helps.

Virtually yours,
- Ryan

-- 
  Ryan Thompson <ryan@sasknow.com>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0105141931200.55236-100000>