Re: using mod_layout for global server headers? urgent!
"Ben Burgess" <[email protected]> Wed, 30 Apr 2008 22:44:02 -0700
| Newsgroups | gmane.comp.apache.mod-layout |
|---|---|
| Message-ID | <[email protected]> |
--===============2548829280784922623== Content-Type: multipart/alternative; boundary="----=_Part_10849_956329.1209620642465" ------=_Part_10849_956329.1209620642465 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline So I could just go : <Directory "/home/"> LayoutFooter /var/ErrorDocs/alert.html </Directory> 2008/4/30 No Bullshit XXX Host <[email protected]>: > yup, they can be used in any apache config files. .htaccess, or your > main config (httpd.conf) wherever. > > 2008/5/1 Ben Burgess <[email protected]>: > > Where can I use the <directory> section? .htaccess or what? > > > > > > 2008/4/30 No Bullshit XXX Host <[email protected]>: > > > > > good stuff. I use it in a <directory> but I think you can use it in > > > a <virtual host> or anything else. mine looks like this: > > > > > > <Directory "/home/somedir/"> > > > AddOutputFilterByType LAYOUT text/html > > > LayoutFooter /var/www/somedir/public_html/adfoot.html > > > LayoutHeader /var/www/somedir/public_html/adhead.html > > > </Directory> > > > > > > you can also use the LayoutFooter/Header with your content right in > > > there, like: > > > > > > LayoutFooter "Hi, I'm a footer" > > > or > > > LayoutFooter "<font size=+10>I got big feet</font>" > > > > > > I use that AddOutputFilterByType to specify all text/html content, but > > > there are options to specify types of files & whatnot, you'd have to check > > > the docs. > > > > > > 2008/4/30 Ben Burgess <[email protected]>: > > > > > > > Yeah I figured it out. So what sort of configuration do you use to > > > > include banners globally? > > > > > > > > > > > > 2008/4/30 No Bullshit XXX Host <[email protected]>: > > > > > > > > > ok, I ran into the same problem once. the makefile wasn't finding > > > > > apxs. hopefully it's installed on your system, or we might have a harder > > > > > task. find apxs (using something like "locate aspx") and in the file > > > > > Makefile, change the "APXS=" line to wherever your aspx is. Mine, for > > > > > example, was "APXS=/usr/sbin/apxs" see if you get anywhere with that, and > > > > > let me know. > > > > > > > > > > > > > > > 2008/4/30 Ben Burgess <[email protected]>: > > > > > > > > > > > I downloaded the tar and tar-xf'd it in the tmp directory. I > > > > > > then ran make and got the following: > > > > > > > > > > > > root@farpoint [/tmp/mod_layout-5.1]# make > > > > > > apxs -c -Wall -DHAVE_DEBUG mod_layout.c utility.c layout.c > > > > > > make: apxs: Command not found > > > > > > make: *** [mod_layout.so] Error 127 > > > > > > root@farpoint [/tmp/mod_layout-5.1]# > > > > > > > > > > > > > > > > > > > > > > > > 2008/4/30 No Bullshit XXX Host <[email protected]>: > > > > > > > > > > > > > the install program will install it. so when you run 'make' > > > > > > > and 'make install' providing there are no errors, it should put everything > > > > > > > in the right place. I'm no expert on the installation process, but have > > > > > > > managed to do it twice now. :-) > > > > > > > > > > > > > > > > > > > > > 2008/4/30 Ben Burgess <[email protected]>: > > > > > > > > > > > > > > > First, make sure Apache 2.0 is in your path (probably means > > > > > > > > adding /usr/local/apache2/bin to your PATH). > > > > > > > > The type: > > > > > > > > make > > > > > > > > > > > > > > > > And then: > > > > > > > > make install > > > > > > > > > > > > > > > > Really, that is all there is to it. You just now need to add > > > > > > > > > > > > > > > > the directives that you need. > > > > > > > > > > > > > > > > What does this mean?! Where am I supposed to place the > > > > > > > > mod_layout files? > > > > > > > > > > > > > > > > 2008/4/30 No Bullshit XXX Host <[email protected]>: > > > > > > > > > > > > > > > > > Hi Ben, ya, you should be able to do that with > > > > > > > > > mod_layout. Personally, I use it to insert ads for a freehost. I'd just > > > > > > > > > download & install according to the readme & whatnot, and the basic > > > > > > > > > configuration should do exactly what you need. > > > > > > > > > > > > > > > > > > Beardo > > > > > > > > > > > > > > > > > > 2008/4/30 Ben Burgess <[email protected]>: > > > > > > > > > > > > > > > > > > > Hey, I want to include a header about the upcoming > > > > > > > > > > Shutdown Day (Sat May 03) on every page hosted on a server I run! Can I use > > > > > > > > > > mod_layout to do this? If so, how? > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > Sincerely, > > > > > > > > > > Ben Burgess > > > > > > > > > > _______________________________________________ > > > > > > > > > > Mod_layout mailing list > > > > > > > > > > [email protected] > > > > > > > > > > http://lists.<http://lists.tangent.org/mailman/listinfo/mod_layout> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > Mod_layout mailing list > > > > > > > > > [email protected] > > > > > > > > > http://lists.tangent.org/mailman/listinfo/mod_layout > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Sincerely, > > > > > > > > Ben Burgess > > > > > > > > _______________________________________________ > > > > > > > > Mod_layout mailing list > > > > > > > > [email protected] > > > > > > > > http://lists.tangent.org/mailman/listinfo/mod_layout > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Mod_layout mailing list > > > > > > > [email protected] > > > > > > > http://lists.tangent.org/mailman/listinfo/mod_layout > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Sincerely, > > > > > > Ben Burgess > > > > > > > > > > > > _______________________________________________ > > > > > > Mod_layout mailing list > > > > > > [email protected] > > > > > > http://lists.tangent.org/mailman/listinfo/mod_layout > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Mod_layout mailing list > > > > > [email protected] > > > > > http://lists.tangent.org/mailman/listinfo/mod_layout > > > > > > > > > > > > > > > > > > > > > > -- > > > > Sincerely, > > > > Ben Burgess > > > > > > > > _______________________________________________ > > > > Mod_layout mailing list > > > > [email protected] > > > > http://lists.tangent.org/mailman/listinfo/mod_layout > > > > > > > > > > > > > > _______________________________________________ > > > Mod_layout mailing list > > > [email protected] > > > http://lists.tangent.org/mailman/listinfo/mod_layout > > > > > > > > > > > > -- > > Sincerely, > > Ben Burgess > > > > _______________________________________________ > > Mod_layout mailing list > > [email protected] > > http://lists.tangent.org/mailman/listinfo/mod_layout > > > > > > _______________________________________________ > Mod_layout mailing list > [email protected] > http://lists.tangent.org/mailman/listinfo/mod_layout > > -- Sincerely, Ben Burgess ------=_Part_10849_956329.1209620642465 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline So I could just go :<br><br><Directory "/home/"><br> LayoutFooter /var/ErrorDocs/alert.html<br></Directory><br><br><br><div class="gmail_quote">2008/4/30 No Bullshit XXX Host <<a href="mailto:[email protected]">[email protected]</a>>:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">yup, they can be used in any apache config files. .htaccess, or your main config (httpd.conf) wherever.<br> <br><div class="gmail_quote">2008/5/1 Ben Burgess <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<div><div></div><div class="Wj3C7c"><br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Where can I use the <directory> section? .htaccess or what?<div><div></div><div> <br><br><div class="gmail_quote">2008/4/30 No Bullshit XXX Host <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> good stuff. I use it in a <directory> but I think you can use it in a <virtual host> or anything else. mine looks like this:<br><br> <Directory "/home/somedir/"><br> AddOutputFilterByType LAYOUT text/html<br> LayoutFooter /var/www/somedir/public_html/adfoot.html<br> LayoutHeader /var/www/somedir/public_html/adhead.html<br> </Directory> <br><br>you can also use the LayoutFooter/Header with your content right in there, like:<br> <br> LayoutFooter "Hi, I'm a footer"<br>or<br> LayoutFooter "<font size=+10>I got big feet</font>"<br><br>I use that AddOutputFilterByType to specify all text/html content, but there are options to specify types of files & whatnot, you'd have to check the docs. <br> <div><div></div><div> <br><div class="gmail_quote">2008/4/30 Ben Burgess <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Yeah I figured it out. So what sort of configuration do you use to include banners globally?<div><div></div><div><br><br><div class="gmail_quote">2008/4/30 No Bullshit XXX Host <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">ok, I ran into the same problem once. the makefile wasn't finding apxs. hopefully it's installed on your system, or we might have a harder task. find apxs (using something like "locate aspx") and in the file Makefile, change the "APXS=" line to wherever your aspx is. Mine, for example, was "APXS=/usr/sbin/apxs" see if you get anywhere with that, and let me know.<div> <div></div><div><br> <br><div class="gmail_quote">2008/4/30 Ben Burgess <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I downloaded the tar and tar-xf'd it in the tmp directory. I then ran make and got the following:<br><br>root@farpoint [/tmp/mod_layout-5.1]# make<br>apxs -c -Wall -DHAVE_DEBUG mod_layout.c utility.c layout.c<br>make: apxs: Command not found<br> make: *** [mod_layout.so] Error 127<br>root@farpoint [/tmp/mod_layout-5.1]#<div><div></div><div><br><br><br><div class="gmail_quote">2008/4/30 No Bullshit XXX Host <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">the install program will install it. so when you run 'make' and 'make install' providing there are no errors, it should put everything in the right place. I'm no expert on the installation process, but have managed to do it twice now. :-)<div> <div></div><div><br> <br><div class="gmail_quote">2008/4/30 Ben Burgess <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style="margin-left: 40px;">First, make sure Apache 2.0 is in your path (probably means<br>adding /usr/local/apache2/bin to your PATH).<br>The type:<br>make<br><br>And then:<br>make install<br><br>Really, that is all there is to it. You just now need to add <br> the directives that you need.<br></div><br>What does this mean?! Where am I supposed to place the mod_layout files?<br><br><div class="gmail_quote">2008/4/30 No Bullshit XXX Host <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>Hi Ben, ya, you should be able to do that with mod_layout. Personally, I use it to insert ads for a freehost. I'd just download & install according to the readme & whatnot, and the basic configuration should do exactly what you need.<br> <br>Beardo<br><br><div class="gmail_quote">2008/4/30 Ben Burgess <<a href="mailto:[email protected]" target="_blank">[email protected]</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div> Hey, I want to include a header about the upcoming Shutdown Day (Sat May 03) on every page hosted on a server I run! Can I use mod_layout to do this? If so, how?<br clear="all"><br>-- <br>Sincerely,<br><font color="#888888">Ben Burgess </font><br></div>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.</a><br> <br></blockquote></div><br> <br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> </div></div><a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br><font color="#888888">Ben Burgess </font><br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div><br> </div></div><br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br>Ben Burgess </div></div><br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div><br> </div></div><br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br>Ben Burgess </div></div><br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div><br> </div></div><br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br>Ben Burgess </div></div><br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div></div></div><br> <br>_______________________________________________<br> Mod_layout mailing list<br> <a href="mailto:[email protected]">[email protected]</a><br> <a href="http://lists.tangent.org/mailman/listinfo/mod_layout" target="_blank">http://lists.tangent.org/mailman/listinfo/mod_layout</a><br> <br></blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br>Ben Burgess ------=_Part_10849_956329.1209620642465-- --===============2548829280784922623== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Mod_layout mailing list [email protected] http://lists.tangent.org/mailman/listinfo/mod_layout --===============2548829280784922623==--