Take Apache 2.2 as an example: Mod

  

What is Mod_Layout

Mod_Layout can place information at the top and bottom of a document (or before or after a label). With the Layout directive you can dynamically insert code anywhere in the document. You can use it to add standard disclaimers to all pages on the server, or to place banner ads on top of all pages. Mod_Layout can handle many types of documents, such as html, text, CGI, Java, PHP or Perl. More features require you to dig.

How to install

Mod_Layout is available for Apache 1.3 Apache 2 Apache 2.2. For all three versions, there is a corresponding Mod_Layout version download.

mod_layout-3.1 for Apache 1.3

mod_layout-4.1 for Apache 2

mod_layout-5.1 for Apache 2.2

All three versions are available at http Download it at://download.tangent.org/.

There are some differences in the way different versions are installed. Let's take Apache 2.2 as an example.

1, download the appropriate Mod_Layout version

wget http://download.tangent.org/mod_layout-5.1.tar.gz

tar xvfz mod_layout-5.1.tar .gz

cd mod_layout-5.1

2, edit Makefile

APXS=apxs

APACHECTL=apachectl

CC=` Apxs -q CC`

INC=-I`apxs -q INCLUDEDIR` `$(APXS) -q CFLAGS` #-DLAYOUT_FILEOWNER_NAME

LD_SHLIB=`apxs -q LDFLAGS_SHLIB`

is mainly to ensure that the path of APXS and APACHECTL is valid.

3, start the installation

make

make install

How to use

Before using, please confirm the code you want to insert Whether the web page enables gzip compression, if enabled, Mod_layout will not work properly.

The following is an example of enabling mod_layout

<virtualhost*:80>

AllowOverride None

Order allow,deny

Allow from all

<Directory /home/foo/public_html>

AllowOverride None

Options SymLinksIfOwnerMatch

AddOutputFilter LAYOUT html

LayoutFooter /menu.html

LayoutIgnoreURI /diary/*

LayoutIgnoreURI /linux/*

Description:

AddOutputFilter LAYOUT html: Start mod_layout page type For html, you can also add php, shtml, etc.

LayoutFooter /menu.html: Add the file menu.html to the end of the document.

LayoutIgnoreURI /diary/*: Exclude documents in the diary directory.

More instructions: http://www.musc.edu/webserver/mod_layout.html#_1_9

Copyright © Windows knowledge All Rights Reserved