r1 - 10 Oct 2005 - 14:33:38 - IuriDinizYou are here: TWiki >  Personal Web  > ApacheWebServer

Apache Web Server (Apache 1)

Adicionar um banner ou qualquer outra coisa automaticamente em todas as páginas.

Basta usar o mod_layout.

#!/bin/sh
apt-get install libapache-mod-layout

após isto, fui no arquivo /etc/apache/httpd.conf a adicionei entre <VirtualHost> e </VirtualHost>:

  LayoutHeader "<h1> reiosse </h1> <img src=\"http://clx.digi.com.br/foto.jpg\"/><hr/> "
  LayoutMerge On

Ele insere este código entre o <body> </body> logo no início, pode-se especificar outro canto com:

  LayoutMergeBeginTag "<head*>"
  LayoutMergeEndTag   "</head>"

Assim ele coloca dentro de <head> </head>

Pode-se também especificar um arquivo ao inves de uma string, use o caminho relativo:

  LayoutHeader /header.php

Também é possível especificar no final da tag:

  LayoutFooter /cgi-bin/footer.pl

Apache 2

Adicionar um banner ou qualquer outra coisa automaticamente em todas as páginas.

mod_ext_filter

mod_layout

        AddOutputFilter LAYOUT html
        LayoutFooter /footer.html
        LayoutHeader "reiosse <hr/>"

Forçando a todos os arquivos de uma diretório para executarem download

  <Directory "/var/sites/cafe/files/" >
    Options -Indexes
    ForceType application/download
    php_flag engine off
  </Directory>
-- IuriDiniz - 10 Oct 2005
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback