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.

3 Responses

  1. 1
    Used Corvette 
    Tuesday, 14. October 2008

    I bookmarked your blog, thanks for sharing this very interesting article

  2. 2
    David Grega 
    Friday, 24. October 2008

    To ensure these VirtualHost directives aren’t lost in a cPanel/WHM environment, I recommend placing the VirtualHost directives outside httpd.conf as documented at:

    cpanel.net/support/docs/ea/ea3/customdirectives.html

  3. I get nothing from mod_layout. no errors, but no header or footer either

    cPanel 11.24.5-R38506 - WHM 11.24.2 - X 3.9
    CENTOS 5.4 x86_64 standard

Leave a Reply