Thursday, October 02nd, 2008 | Author: Angelo

Using mod_layout you can create a single look for your site by placing information at both the beginning and the end of a document (header and footer). It is useful for adding banners at the top or end of all web pages. Also if wish you can insert layouts in documents at any place dynamically.

Below are the steps to install mod_layout on your cPanel server.

Download tar file for installtion

A. wget http://www.tangent.org/download/mod_layout-3.2.1.tar.gz
B. tar xvfz mod_layout-3.2.tar.gz
C. cd mod_layout-3.2
D. vi Makefile
and find following
# the used tools
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`

Replace the values with the following details :

# the used tools
APXS=/usr/local/apache/bin/apxs
APACHECTL=apachectl
CC=`/usr/local/apache/bin/apxs -q CC`
INC=-I`/usr/local/apache/bin/apxs -q INCLUDEDIR` `$(APXS) -q CFLAGS` #-DLAYOUT_FILEOWNER_NAME
LD_SHLIB=`/usr/local/apache/bin/apxs -q LDFLAGS_SHLIB`
save the file Makefile and then

E. make
F. make install
G. edit httpd.conf
And added LayoutHeader and LayoutFooter Directive as below.

<Virtualhost www.domainname.com>
LayoutHeader “<P> This is the beginning of things<P>”
LayoutFooter “<P> This is the tail end of things<P>”
</virtualhost>

You are done….

Category: apache
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply