1-anexoconfiguracionapache

Upload: jose-antonio-ortiz-rojas

Post on 01-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 1-AnexoConfiguracionApache

    1/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    Anexo II

    Ejemplos de ficheros de configuracin de Apache Web Server

    hhtpd.conf

    #

    # Based upon the NCSA server configuration files originally by Rob McCool.

    #

    # This is the main Apache server configuration file. t contains the

    # configuration directives that give the server its instructions.

    # See !"R$http$%%httpd.apache.org%docs&'.(%) for detailed information about

    # the directives.

    #

    # *o N+T simply read the instructions in here ,ithout understanding

    # ,hat they do. They-re here only as hints or reminders. f you are unsure

    # consult the online docs. ou have been ,arned.

    #

    # The configuration directives are grouped into three basic sections$# /. *irectives that control the operation of the Apache server process as a

    # ,hole 0the -global environment-1.

    # '. *irectives that define the parameters of the -main- or -default- server2

    # ,hich responds to re3uests that aren-t handled by a virtual host.

    # These directives also provide default values for the settings

    # of all virtual hosts.

    # 4. Settings for virtual hosts2 ,hich allo, 5eb re3uests to be sent to

    # different 6 addresses or hostnames and have them handled by the

    # same Apache server process.

    #

    # Configuration and logfile names$ f the filenames you specify for many

    # of the server-s control files begin ,ith 7%7 0or 7drive$%7 for 5in4'12 the

    # server ,ill use that e8plicit path. f the filenames do 9not9 begin

    # ,ith 7%72 the value of ServerRoot is prepended && so 7logs%foo.log7

    # ,ith ServerRoot set to 7C$%Archivos de programa%Apache :roup%Apache'7 ,ill be interpreted by the

    # server as 7C$%Archivos de programa%Apache :roup%Apache'%logs%foo.log7.

    #

    # N+T;$ 5here filenames are specified2 you must use for,ard slashes

    Curso de Administrador de Servidores Internet / Extranet / Intranet

  • 8/9/2019 1-AnexoConfiguracionApache

    2/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    # instead of bac

  • 8/9/2019 1-AnexoConfiguracionApache

    3/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    #

    # Timeout$ The number of seconds before receives and sends time out.

    #

    Timeout 4((

    #

    # eepAlive$ 5hether or not to allo, persistent connections 0more than

    # one re3uest per connection1. Set to 7+ff7 to deactivate.

    #

    eepAlive +n

    #

    # Ma8eepAliveRe3uests$ The ma8imum number of re3uests to allo,# during a persistent connection. Set to ( to allo, an unlimited amount.

    # 5e recommend you leave this number high2 for ma8imum performance.

    #

    Ma8eepAliveRe3uests /((

    #

    # eepAliveTimeout$ Number of seconds to ,ait for the ne8t re3uest from the

    # same client on the same connection.

    #

    eepAliveTimeout /

    ##

    ## Server&6ool SiDe Regulation 0M6M specific1

    ##

    # 5inNT M6M

    # Threads6erChild$ constant number of ,or

  • 8/9/2019 1-AnexoConfiguracionApache

    4/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    # Change this to isten on specific 6 addresses as sho,n belo, to

    # prevent Apache from glomming onto all bound 6 addresses 0(.(.(.(1

    #

    #isten /'.4G.H.IJ$J(

    isten J(

    #

    # *ynamic Shared +bKect 0*S+1 Support

    #

    # To be able to use the functionality of a module ,hich ,as built as a *S+ you

    # have to place corresponding LoadModule- lines at this location so the

    # directives contained in it are actually available @before@ they are used.

    # Statically compiled modules 0those listed by Lhttpd &l-1 do not need

    # to be loaded here.#

    # ;8ample$

    # oadModule foo@module modules%[email protected]

    #

    oadModule access@module modules%[email protected]

    oadModule actions@module modules%[email protected]

    oadModule alias@module modules%[email protected]

    oadModule asis@module modules%[email protected]

    oadModule auth@module modules%[email protected]

    #oadModule auth@anon@module modules%mod@[email protected]

    #oadModule auth@dbm@module modules%mod@[email protected]

    #oadModule auth@digest@module modules%mod@[email protected]

    oadModule autoinde8@module modules%[email protected]

    #oadModule cern@meta@module modules%mod@[email protected]

    oadModule cgi@module modules%[email protected]

    #oadModule dav@module modules%[email protected]

    #oadModule dav@fs@module modules%mod@[email protected]

    oadModule dir@module modules%[email protected]

    oadModule env@module modules%[email protected]

    #oadModule e8pires@module modules%[email protected]

    #oadModule file@cache@module modules%mod@[email protected]

    #oadModule headers@module modules%[email protected]

    oadModule imap@module modules%[email protected]

    oadModule include@module modules%[email protected]

    #oadModule info@module modules%[email protected]

    oadModule isapi@module modules%[email protected]

    oadModule log@config@module modules%mod@[email protected]

    oadModule mime@module modules%[email protected]

    Curso de Administrador de Servidores Internet / Extranet / Intranet

  • 8/9/2019 1-AnexoConfiguracionApache

    5/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    #oadModule mime@magic@module modules%mod@[email protected]

    #oadModule pro8y@module modules%[email protected]

    #oadModule pro8y@connect@module modules%mod@[email protected]

    #oadModule pro8y@http@module modules%mod@[email protected]

    #oadModule pro8y@ftp@module modules%mod@[email protected]

    oadModule negotiation@module modules%[email protected]

    #oadModule re,rite@module modules%mod@re,rite.so

    oadModule setenvif@module modules%[email protected]

    #oadModule speling@module modules%[email protected]

    #oadModule status@module modules%[email protected]

    #oadModule uni3ue@id@module modules%mod@[email protected]

    oadModule userdir@module modules%[email protected]

    #oadModule usertrac

  • 8/9/2019 1-AnexoConfiguracionApache

    6/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    #

    # ServerName gives the name and port that the server uses to identify itself.

    # This can often be determined automatically2 but ,e recommend you specify

    # it e8plicitly to prevent problems during startup.

    #

    # f this is not set to valid *NS name for your host2 server&generated

    # redirections ,ill not ,or

  • 8/9/2019 1-AnexoConfiguracionApache

    7/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    #

    # Note that from this point for,ard you must specifically allo,

    # particular features to be enabled & so if something-s not ,or

  • 8/9/2019 1-AnexoConfiguracionApache

    8/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    #

    # "ser*ir$ The name of the directory that is appended onto a user-s home

    # directory if a user re3uest is received. Be especially careful to use

    # proper2 for,ard slashes here. +n 5indo,s NT2 76ersonal%My 5ebsite7

    # is a more appropriate choice.

    #

    "ser*ir 7My *ocuments%My 5ebsite7

    #

    # Control access to "ser*ir directories. The follo,ing is an e8ample

    # for a site ,here these directories are restricted to read&only.

    #

    # ou must correct the path for the root to match your system-s configured

    # user directory location2 e.g. 7C$%5inNT%profiles%9%My *ocuments%My 5ebsite7# or ,hichever2 as appropriate.

    #

    #!*irectory 7C$%*ocuments and Settings%9%My *ocuments%My 5ebsite7)

    # Allo,+verride ?ilenfo AuthConfig imit

    # +ptions MultiEie,s nde8es Symin

  • 8/9/2019 1-AnexoConfiguracionApache

    9/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    # directive.

    #

    Access?ileName .htaccess

    #

    # The follo,ing lines prevent .htaccess and .htpass,d files from being

    # vie,ed by 5eb clients.

    #

    !?iles 7O=.ht7)

    +rder allo,2deny

    *eny from all

    !%?iles)

    ## TypesConfig describes ,here the mime.types file 0or e3uivalent1 is

    # to be found.

    #

    TypesConfig conf%mime.types

    #

    # *efaultType is the default MM; type the server ,ill use for a document

    # if it cannot other,ise determine one2 such as from filename e8tensions.

    # f your server contains mostly te8t or FTM documents2 7te8t%plain7 is

    # a good value. f most of your content is binary2 such as applications

    # or images2 you may ,ant to use 7application%octet&stream7 instead to

    #

  • 8/9/2019 1-AnexoConfiguracionApache

    10/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    # The default is off because it-d be overall better for the net if people

    # had to

  • 8/9/2019 1-AnexoConfiguracionApache

    11/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    #

    # The follo,ing directives define some format nic

  • 8/9/2019 1-AnexoConfiguracionApache

    12/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    ServerTo

  • 8/9/2019 1-AnexoConfiguracionApache

    13/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    +ptions nde8es

    Allo,+verride None

    +rder allo,2deny

    Allo, from all

    !?iles 9.html)

    SetFandler type&map

    !%?iles)

    Set;nvf Re3uest@"R O%manual%de% prefer&languageWde

    Set;nvf Re3uest@"R O%manual%en% prefer&languageWen

    Set;nvf Re3uest@"R O%manual%fr% prefer&languageWfr

    Set;nvf Re3uest@"R O%manual%Ka% prefer&languageWKa

    Set;nvf Re3uest@"R O%manual%

  • 8/9/2019 1-AnexoConfiguracionApache

    14/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    # clients ,here to loo< for the relocated document.

    # ;8ample$

    # Redirect permanent %foo http$%%,,,.e8ample.com%bar

    #

    # *irectives controlling the display of server&generated directory listings.

    #

    #

    # nde8+ptions$ Controls the appearance of server&generated directory

    # listings.

    #

    nde8+ptions ?ancynde8ing EersionSort

    #

    # Addcon9 directives tell the server ,hich icon to sho, for different

    # files or filename e8tensions. These are only displayed for

    # ?ancynde8ed directories.

    #

    AddconBy;ncoding 0CM62%icons%compressed.gif1 8&compress 8&gDip

    AddconByType 0TXT2%icons%te8t.gif1 te8t%9

    AddconByType 0M:2%icons%image'.gif1 image%9

    AddconByType 0SN*2%icons%sound'.gif1 audio%9

    AddconByType 0E*2%icons%movie.gif1 video%9

    Addcon %icons%binary.gif .bin .e8e

    Addcon %icons%binhe8.gif .h38

    Addcon %icons%tar.gif .tar

    Addcon %icons%,orld'.gif .,rl .,rl.gD .vrml .vrm .iv

    Addcon %icons%compressed.gif .Y .D .tgD .gD .Dip

    Addcon %icons%a.gif .ps .ai .eps

    Addcon %icons%layout.gif .html .shtml .htm .pdf

    Addcon %icons%te8t.gif .t8t

    Addcon %icons%c.gif .c

    Addcon %icons%p.gif .pl .py

    Addcon %icons%f.gif .for

    Addcon %icons%dvi.gif .dvi

    Addcon %icons%uuencoded.gif .uu

    Addcon %icons%script.gif .conf .sh .shar .csh .

  • 8/9/2019 1-AnexoConfiguracionApache

    15/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    Addcon %icons%bac

  • 8/9/2019 1-AnexoConfiguracionApache

    16/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    # Specify a default language. This means that all data

    # going out ,ithout a specific language tag 0see belo,1 ,ill

    # be mar

  • 8/9/2019 1-AnexoConfiguracionApache

    17/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    Addanguage fr .fr

    Addanguage he .he

    Addanguage hr .hr

    Addanguage it .it

    Addanguage Ka .Ka

    Addanguage

  • 8/9/2019 1-AnexoConfiguracionApache

    18/27

    Instalacin y Configuracin de Servicios Intranet / Extranet / Internet

    # ,hich encourage you to al,ays set a default char set.

    #

    Add*efaultCharset S+&JJP&/

    #

    # Commonly used filename e8tensions to character sets. ou probably

    # ,ant to avoid clashes ,ith the language e8tensions2 unless you

    # are good at carefully testing your setup after each change.

    # See http$%%,,,.iana.org%assignments%character&sets for the

    # official list of charset names and their respective R?Cs.

    #

    AddCharset S+&JJP&/ .isoJJP&/ .latin/

    AddCharset S+&JJP&' .isoJJP&' .latin' .cen

    AddCharset S+&JJP&4 .isoJJP&4 .latin4AddCharset S+&JJP&G .isoJJP&G .latinG

    AddCharset S+&JJP& .isoJJP& .latin .cyr .iso&ru

    AddCharset S+&JJP&H .isoJJP&H .latinH .arb

    AddCharset S+&JJP&I .isoJJP&I .latinI .gr