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...how to use?

Discussion in 'General Discussion' started by Spirid, Oct 31, 2004.

  1. Spirid

    Spirid Registered

    Joined:
    Sep 6, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I don't know if this really fits here, since im a newb at WHM stuff..but this seems to be one of those intermidate-advanced problems..

    Anyway, I have mod_layout installed on my server..but I dont have any clue as to how to use it. I'm still pretty un-familiar with SSH and the server thing. After reading that I have to edit my httpd.conf I got a bit scared as I don't want to mess up my server.

    Can anyone give me a basic alignment of what I need to do in order to put ads on my user's sites? I have 3 hosting packages, are there anyway to force ads on just 2 of them?

    I don't have a single clue as of what to do right now.

    Thanks
    Ken.
     
  2. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Yes. You can force ads in header or footer on any site. You just would have to create a file containing your ads and save it as somead.html in say /usr/local/apache/htdocs

    Then do the addition within the <VirtualHost> </VirtualHost> section of the given site.
    The documentation of mod_layout is pretty simple, short and self explanatory.

    Editing httpd.conf is easiest way to do as you know what you are doing....

    example of having a footer ad on a given site is:

    <IfModule mod_layout.c>
    LayoutFooter "/usr/local/apache/htdocs/someadfooter.html"
    </IfModule>

    Then all the pages on the given site would carry footer ads containing whatever you put up in the someadfooter.html file. There could be problems for framed sites, however.

    Hope this helps
    Anup
     
  3. Spirid

    Spirid Registered

    Joined:
    Sep 6, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    thanks, how I do put ads on every site though?
     
  4. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Repeat for each VirtualHost to be safe. This way you could really see that in case the site is a framed one, you could ignore that site

    Anup
     

Share This Page