Difference between revisions of "How to enable server side includes"

From EPrints Documentation
Jump to: navigation, search
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Version|since=3.2.1}}
 
{{Version|since=3.2.1}}
  
Note: you must have the [http://httpd.apache.org/docs/2.0/howto/ssi.html Apache Server Side Includes (SSI)] module installed and enabled.
+
You must have the [http://httpd.apache.org/docs/2.0/howto/ssi.html Apache Server Side Includes (SSI)] module installed and enabled.
  
Edit <tt>archives/[repoid]/cfg/apache.conf</tt> and add to the <tt><Location></tt> section <tt>AddOutputFilter</tt> and <tt>+Includes</tt>:
+
This enables you to add includes to the content of static pages. If you want to add dynamic content to the template you should do this via a template part in cfg.d/dynamic_template.pl.
 +
 
 +
===Configuration===
 +
 
 +
Edit <tt>cfg/apache/[repoid].conf</tt> and add to the <tt><Location></tt> section <tt>AddOutputFilter</tt> and <tt>+Includes</tt>:
 
   <Location "/eprints">
 
   <Location "/eprints">
 
     PerlSetVar EPrints_ArchiveID myrepo
 
     PerlSetVar EPrints_ArchiveID myrepo
Line 15: Line 19:
  
 
Restart apache.
 
Restart apache.
 +
 +
===Example===
 +
 +
&lt;!--#include virtual="/cgi/mydynbit"--&gt;
  
 
[[Category:Howto]]
 
[[Category:Howto]]

Revision as of 16:04, 17 May 2010

Warning This feature requires EPrints version 3.2.1 or later

You must have the Apache Server Side Includes (SSI) module installed and enabled.

This enables you to add includes to the content of static pages. If you want to add dynamic content to the template you should do this via a template part in cfg.d/dynamic_template.pl.

Configuration

Edit cfg/apache/[repoid].conf and add to the <Location> section AddOutputFilter and +Includes:

 <Location "/eprints">
   PerlSetVar EPrints_ArchiveID myrepo
   
   AddOutputFilter INCLUDES .html
   
   Options +ExecCGI +Includes
   Order allow,deny 
   Allow from all
 </Location>

Restart apache.

Example

<!--#include virtual="/cgi/mydynbit"-->