The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mod_layout

Discussion in 'General Discussion' started by phantom, Jun 11, 2003.

  1. phantom

    phantom Well-Known Member

    Joined:
    Sep 17, 2002
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Does anybody know how to set up mod_layout?

    What I'm wanting to do is have a header and footer at the top and bottom of each page that is created by a client.

    Mod_Layout does just that but if anyone knows another way, that would be great too.

    cPanel.net Support Ticket Number:
     
  2. JSD

    JSD Member

    Joined:
    Feb 19, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    im having problems as well installing mod_layout....any help?

    cPanel.net Support Ticket Number:
     
  3. phantom

    phantom Well-Known Member

    Joined:
    Sep 17, 2002
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    I would love to see it as part of the RPM's
    :D

    cPanel.net Support Ticket Number:
     
  4. showmantec

    showmantec Registered

    Joined:
    Dec 10, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    The problem is actually with APXS. cPanel installs Apache to a non default directory so APXS can't find it to query it's version info creating errors when you try to install mod_layout.

    Here's how I got it installed...

    1) Download and extract the latest version of mod_layout to a temp directory on your server
    (http://software.tangent.org/download/mod_layout-3.2.tar.gz)

    2) Edit the file /usr/sbin/apxs

    Look for the lines...

    my $CFG_PREFIX = q(/etc/httpd); # substituted via APACI install
    my $CFG_SBINDIR = q(/usr/sbin); # substituted via APACI install
    my $CFG_INCLUDEDIR = q(/usr/include/apache); # substituted via APACI install
    my $CFG_LIBEXECDIR = q(/usr/lib/apache); # substituted via APACI install
    my $CFG_SYSCONFDIR = q(/etc/httpd/conf); # substituted via APACI install

    And change them to...

    my $CFG_PREFIX = q(/usr/local/apache); # substituted via APACI install
    my $CFG_SBINDIR = q(/usr/local/apache/bin); # substituted via APACI install
    my $CFG_INCLUDEDIR = q(/usr/local/apache/include); # substituted via APACI install
    my $CFG_LIBEXECDIR = q(/usr/local/apache/libexec); # substituted via APACI install
    my $CFG_SYSCONFDIR = q(/usr/local/apache/conf); # substituted via APACI install


    3) Save apxs and return to your mod_layout install directory.

    4) make

    5) make install

    It should install just fine..

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  5. JSD

    JSD Member

    Joined:
    Feb 19, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    nice! :)

    you are a genius! works perfectly for me.

    cPanel.net Support Ticket Number:
     
  6. perlchild

    perlchild Well-Known Member

    Joined:
    Sep 1, 2002
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    I've actually had a good experience removing the apache that comes with redhat first... so there is no /usr/sbin/apxs and /usr/local/apache/bin/apxs being in the path, is found just fine

    cPanel.net Support Ticket Number:
     
  7. Valetia

    Valetia Well-Known Member

    Joined:
    Jun 20, 2002
    Messages:
    207
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    How do you do that?
     
  8. RaveKnights

    RaveKnights Well-Known Member

    Joined:
    Nov 5, 2003
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Some Where Out There!
    I hate to bother, anyone think they could help me a bit here.

    My apxs is installed /usr/local/apache/bin/apxs

    My apxs shows the right paths but this is what I get when I try to make

    `apxs -q CC` -I`apxs -q INCLUDEDIR` `apxs -q CFLAGS` -c mod_layout.c -Wall -DDEBUG
    /bin/sh: apxs: command not found
    /bin/sh: apxs: command not found
    /bin/sh: apxs: command not found
    /bin/sh: -I: command not found
    make: *** [mod_layout.o] Error 127

    apxs command not found in /bin/sh is what I dont get here.

    any one know how to work around this?

    I would greatly appreciate any input,

    Thank You

    Rave Knights
     
  9. I-Web

    I-Web Well-Known Member

    Joined:
    Jul 7, 2003
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    I want to setup some free hosting, that would include banners...... is it possible to get WHM to configure httpd.conf depending on the package chosen to be installed, to add the mod_layout headers and footers to the virtualhost part? or am i going to have to add it manually each time?
     
  10. Optical

    Optical Well-Known Member

    Joined:
    Dec 7, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    yay i got mod_layout installed ! and i had the same errors as 2 post above me but! i fixed it :)
     
  11. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Sorry to bother you guys, but can someone shows me how to use it ?? Is there some examples or instructions how to make the banners shows for some hosting accounts (not all).
     
  12. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    And you don't want to share what you did to fix the problem?
     
  13. Optical

    Optical Well-Known Member

    Joined:
    Dec 7, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    I do :D all i did was edit the make file, and put in the EXACT paths to apex or what ever it was
     
  14. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    I have make installed OK. But when I trying to use it, I got segmentation error, anyone knows why ?

    BTW, I install it by make a link in /usr/sbin to /usr/local/apache/bin/apxs so that it won't said apxs not found. I don't know if this is OK, but I did pass the make and make install.
     
  15. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Although I pass the make, and apache works fine, but when I add :
    LayoutFooter /home/xxx/public_html/footer.txt
    and restart apache, I see segmentation error.
    Why ?
     
  16. Optical

    Optical Well-Known Member

    Joined:
    Dec 7, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    did you try chmoding, or what did you try?
     
  17. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    I am not sure if u are talking to me, what I do to httpd.conf file is only add a line just like the README file said, and restart apache.
    As the apxs, I just add a link in /usr/sbin , so it can find /usr/sbin/apxs link to /usr/local/apache/bin/apxs .
     
  18. HD-Sam

    HD-Sam Active Member
    PartnerNOC

    Joined:
    Sep 23, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Iowa City, Iowa
    Hello
    I did exactly as jameshi said.

    I copied the /usr/local/apache/bin/apxs to /usr/sbin/apxs

    It worked fine, I got through though the make and make install without problems.

    But when I add the line for
    LayoutHeader /path/file.html

    It provides segmentation fault.

    Here is the response from "service httpd configtest"

    root@rav4 [/updates/mod_layout-3.2.1]# service httpd configtest
    Trying to insert <body*>
    ADDING LAYOUT:<body*> (1) (2)(1)
    Warning: DocumentRoot [/dev/null] does not exist
    /etc/init.d/httpd: line 192: 5543 Segmentation fault
    $HTTPD -t
    root@rav4 [/updates/mod_layout-3.2.1]#
     
  19. Optical

    Optical Well-Known Member

    Joined:
    Dec 7, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    Try it my way then
     
  20. HD-Sam

    HD-Sam Active Member
    PartnerNOC

    Joined:
    Sep 23, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Iowa City, Iowa
    Hi Optical,
    Which line are you supposed to edit in Makefile?

    # 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`


    Those lines above are all the lines that contain "apxs"
    Which one is supposed to contain the path?
    and you referred to chmodding it? What is exactly are you chmodding and what is chmoded to?
    thanks,
     

Share This Page