Pratica: Aggiunta dei settaggi standard per la gestione dei documenti

Questa esercitazione prevede l'inserimento delle direttive che gestiscono il file content ed encoding nel file httpd2.conf, usando come fonte il file di configurazione originale di Apache.

1- Dal httpd.conf originale copiare tutte le righe che contengono le seguenti direttive (per ogni riga cercare di spiegare a cosa serve e come viene applicata, eventualmente sperimentando parametri alternativi):
TypesConfig AddType AddHandler AddEncoding Content-Language AddLanguage DefaultLanguage LanguagePriority
MimeMagicFile

<IfModule mod_mime_magic.c>
#   MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic # Se il modulo mime_magic viene caricato, si definisce il file di configurazione con la definizione del MIME type secondo dei pattern di caratteri predefiniti in un file.
</IfModule>

<IfModule mod_mime.c> # Tutte le direttive che seguono sono fornite dal modulo mod_mime
TypesConfig /etc/mime.types # Definisce il file di sistema che definisce l'elenco dei MIME type
DefaultType text/plain # Il MIME type usato di default per l'invio di file (di cui Apache non conosce il MIME type)

AddEncoding x-compress Z # Definisce l'encoding di un file a seconda della sua estensione
AddEncoding x-gzip gz tgz
# DefaultLanguage nl # Definisce il linguaggio di default da usare nel response header Content-Language:
AddLanguage da .dk # Associa il linguaggio da (danese) all'estensione .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .et
AddLanguage fr .fr
AddLanguage de .de
AddLanguage he .he
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddLanguage pl .po
AddLanguage kr .kr
AddLanguage pt .pt
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pt-br .pt-br
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddLanguage hr .hr
%lt;IfModule mod_negotiation.c%gt;
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv tw # Se è caricato il modulo negotiation, indica l'ordine di preferenza delle lingue con cui vengono serviti i documenti dal server quando il client non indica con l'header Accept-Language le lingue che può/vuole accettare  
%lt;/IfModule%gt;

AddCharset ISO-8859-1  .iso8859-1  .latin1 # Imposta set di caratteri aggiuntivi
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8
AddCharset GB2312      .gb2312 .gb
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis
AddType application/x-tar .tgz # Aggiunge uno specifico MIME type, oltre a quelli già caricati con il file mime.types
#AddHandler cgi-script .cgi
#AddHandler send-as-is asis
AddHandler imap-file map # Si associa l'estensione map all'handler (procedura interna di Apache) specificata
AddHandler type-map var
%lt;/IfModule%gt;

Privacy Policy