NoPaste

von TuhPon

SNIPPET_TEXT:
  1. [code]##
  2. ## httpd.conf -- Apache HTTP server configuration file
  3. ##
  4.  
  5. #
  6. # Based upon the NCSA server configuration files originally by Rob McCool.
  7. #
  8. # This is the main Apache server configuration file.  It contains the
  9. # configuration directives that give the server its instructions.
  10. # See <URL:http://www.apache.org/docs/> for detailed information about
  11. # the directives.
  12. #
  13. # Do NOT simply read the instructions in here without understanding
  14. # what they do.  They're here only as hints or reminders.  If you are unsure
  15. # consult the online docs. You have been warned.  
  16. #
  17. # After this file is processed, the server will look for and process
  18. # /etc/apache/srm.conf and then /etc/apache/access.conf
  19. # unless you have overridden these with ResourceConfig and/or
  20. # AccessConfig directives here.
  21. #
  22. # The configuration directives are grouped into three basic sections:
  23. #  1. Directives that control the operation of the Apache server process as a
  24. #     whole (the 'global environment').
  25. #  2. Directives that define the parameters of the 'main' or 'default' server,
  26. #     which responds to requests that aren't handled by a virtual host.
  27. #     These directives also provide default values for the settings
  28. #     of all virtual hosts.
  29. #  3. Settings for virtual hosts, which allow Web requests to be sent to
  30. #     different IP addresses or hostnames and have them handled by the
  31. #     same Apache server process.
  32. #
  33. # Configuration and logfile names: If the filenames you specify for many
  34. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  35. # server will use that explicit path.  If the filenames do *not* begin
  36. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  37. # with ServerRoot set to "/usr/local/apache" will be interpreted by the
  38. # server as "/usr/local/apache/logs/foo.log".
  39. #
  40.  
  41. ### Section 1: Global Environment
  42. #
  43. # The directives in this section affect the overall operation of Apache,
  44. # such as the number of concurrent requests it can handle or where it
  45. # can find its configuration files.
  46. #
  47.  
  48. #
  49. # ServerType is either inetd, or standalone.  Inetd mode is only supported on
  50. # Unix platforms.
  51. #
  52. ServerType standalone
  53.  
  54. #
  55. # ServerRoot: The top of the directory tree under which the server's
  56. # configuration, error, and log files are kept, unless they are specified
  57. # with an absolute path.
  58. #
  59. # NOTE!  If you intend to place this on an NFS (or otherwise network)
  60. # mounted filesystem then please read the LockFile documentation
  61. # (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
  62. # you will save yourself a lot of trouble.
  63. #
  64. # Do NOT add a slash at the end of the directory path.
  65. #
  66. ServerRoot /etc/apache
  67.  
  68. #
  69. # The LockFile directive sets the path to the lockfile used when Apache
  70. # is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
  71. # USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
  72. # its default value. The main reason for changing it is if the logs
  73. # directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
  74. # DISK. The PID of the main server process is automatically appended to
  75. # the filename.
  76. #
  77. LockFile /var/lock/apache.lock
  78.  
  79. #
  80. # PidFile: The file in which the server should record its process
  81. # identification number when it starts.
  82. #
  83. PidFile /var/run/apache.pid
  84.  
  85. #
  86. # ScoreBoardFile: File used to store internal server process information.
  87. # Not all architectures require this.  But if yours does (you'll know because
  88. # this file will be  created when you run Apache) then you *must* ensure that
  89. # no two invocations of Apache share the same scoreboard file.
  90. #
  91. ScoreBoardFile /var/run/apache.scoreboard
  92.  
  93. #
  94. # In the standard configuration, the server will process this file,
  95. # srm.conf, and access.conf in that order.  The latter two files are
  96. # now distributed empty, as it is recommended that all directives
  97. # be kept in a single file for simplicity.  The commented-out values
  98. # below are the built-in defaults.  You can have the server ignore
  99. # these files altogether by using "/dev/null" (for Unix) or
  100. # "nul" (for Win32) for the arguments to the directives.
  101. #
  102. #ResourceConfig /etc/apache/srm.conf
  103. #AccessConfig /etc/apache/access.conf
  104.  
  105. #
  106. # Timeout: The number of seconds before receives and sends time out.
  107. #
  108. Timeout 300
  109.  
  110. #
  111. # KeepAlive: Whether or not to allow persistent connections (more than
  112. # one request per connection). Set to "Off" to deactivate.
  113. #
  114. KeepAlive On
  115.  
  116. #
  117. # MaxKeepAliveRequests: The maximum number of requests to allow
  118. # during a persistent connection. Set to 0 to allow an unlimited amount.
  119. # We recommend you leave this number high, for maximum performance.
  120. #
  121. MaxKeepAliveRequests 100
  122.  
  123. #
  124. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  125. # same client on the same connection.
  126. #
  127. KeepAliveTimeout 15
  128.  
  129. #
  130. # Server-pool size regulation.  Rather than making you guess how many
  131. # server processes you need, Apache dynamically adapts to the load it
  132. # sees --- that is, it tries to maintain enough server processes to
  133. # handle the current load, plus a few spare servers to handle transient
  134. # load spikes (e.g., multiple simultaneous requests from a single
  135. # Netscape browser).
  136. #
  137. # It does this by periodically checking how many servers are waiting
  138. # for a request.  If there are fewer than MinSpareServers, it creates
  139. # a new spare.  If there are more than MaxSpareServers, some of the
  140. # spares die off.  The default values are probably OK for most sites.
  141. #
  142. MinSpareServers 5
  143. MaxSpareServers 10
  144.  
  145. #
  146. # Number of servers to start initially --- should be a reasonable ballpark
  147. # figure.
  148. #
  149. StartServers 5
  150.  
  151. #
  152. # Limit on total number of servers running, i.e., limit on the number
  153. # of clients who can simultaneously connect --- if this limit is ever
  154. # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
  155. # It is intended mainly as a brake to keep a runaway server from taking
  156. # the system with it as it spirals down...
  157. #
  158. MaxClients 150
  159.  
  160. #
  161. # MaxRequestsPerChild: the number of requests each child process is
  162. # allowed to process before the child dies.  The child will exit so
  163. # as to avoid problems after prolonged use when Apache (and maybe the
  164. # libraries it uses) leak memory or other resources.  On most systems, this
  165. # isn't really needed, but a few (such as Solaris) do have notable leaks
  166. # in the libraries. For these platforms, set to something like 10000
  167. # or so; a setting of 0 means unlimited.
  168. #
  169. # NOTE: This value does not include keepalive requests after the initial
  170. #       request per connection. For example, if a child process handles
  171. #       an initial request and 10 subsequent "keptalive" requests, it
  172. #       would only count as 1 request towards this limit.
  173. #
  174. MaxRequestsPerChild 100
  175.  
  176. #
  177. # Listen: Allows you to bind Apache to specific IP addresses and/or
  178. # ports, in addition to the default. See also the <VirtualHost>
  179. # directive.
  180. #
  181. #Listen 3000
  182. #Listen 12.34.56.78:80
  183.  
  184. #
  185. # BindAddress: You can support virtual hosts with this option. This directive
  186. # is used to tell the server which IP address to listen to. It can either
  187. # contain "*", an IP address, or a fully qualified Internet domain name.
  188. # See also the <VirtualHost> and Listen directives.
  189. #
  190. #BindAddress *
  191.  
  192. #
  193. # Dynamic Shared Object (DSO) Support
  194. #
  195. # To be able to use the functionality of a module which was built as a DSO you
  196. # have to place corresponding `LoadModule' lines at this location so the
  197. # directives contained in it are actually available _before_ they are used.
  198. # Please read the file README.DSO in the Apache 1.3 distribution for more
  199. # details about the DSO mechanism and run `apache -l' for the list of already
  200. # built-in (statically linked and thus always available) modules in your apache
  201. # binary.
  202. #
  203. # Please keep this LoadModule: line here, it is needed for installation.
  204. Include /etc/apache/modules.conf
  205.  
  206. #
  207. # ExtendedStatus: controls whether Apache will generate "full" status
  208. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  209. # Off) when the "server-status" handler is called. The default is Off.
  210. #
  211. <IfModule mod_status.c>
  212.   ExtendedStatus On
  213. </IfModule>
  214.  
  215. ### Section 2: 'Main' server configuration
  216. #
  217. # The directives in this section set up the values used by the 'main'
  218. # server, which responds to any requests that aren't handled by a
  219. # <VirtualHost> definition.  These values also provide defaults for
  220. # any <VirtualHost> containers you may define later in the file.
  221. #
  222. # All of these directives may appear inside <VirtualHost> containers,
  223. # in which case these default settings will be overridden for the
  224. # virtual host being defined.
  225. #
  226.  
  227. #
  228. # If your ServerType directive (set earlier in the 'Global Environment'
  229. # section) is set to "inetd", the next few directives don't have any
  230. # effect since their settings are defined by the inetd configuration.
  231. # Skip ahead to the ServerAdmin directive.
  232. #
  233.  
  234. #
  235. # Port: The port to which the standalone server listens. For
  236. # ports < 1023, you will need apache to be run as root initially.
  237. #
  238. Port 81
  239.  
  240. #
  241. # If you wish apache to run as a different user or group, you must run
  242. # apacheas root initially and it will switch.  
  243. #
  244. # User/Group: The name (or #number) of the user/group to run apache as.
  245. #  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
  246. #  . On HPUX you may not be able to use shared memory as nobody, and the
  247. #    suggested workaround is to create a user www and use that user.
  248. #  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
  249. #  when the value of (unsigned)Group is above 60000;
  250. #  don't use Group nobody on these systems!
  251. #
  252. User www-data
  253. Group www-data
  254.  
  255. #
  256. # ServerAdmin: Your address, where problems with the server should be
  257. # e-mailed.  This address appears on some server-generated pages, such
  258. # as error documents.
  259. #
  260. ServerAdmin webmaster@ares
  261.  
  262. #
  263. # ServerName: allows you to set a host name which is sent back to clients for
  264. # your server if it's different than the one the program would get (i.e., use
  265. # "www" instead of the host's real name).
  266. #
  267. # Note: You cannot just invent host names and hope they work. The name you
  268. # define here must be a valid DNS name for your host. If you don't understand
  269. # this, ask your network administrator.
  270. # If your host doesn't have a registered DNS name, enter its IP address here.
  271. # You will have to access it by its address (e.g., http://123.45.67.89/)
  272. # anyway, and this will make redirections work in a sensible way.
  273. ServerName localhost
  274. #
  275. #ServerName new.host.name
  276.  
  277. #
  278. # DocumentRoot: The directory out of which you will serve your
  279. # documents. By default, all requests are taken from this directory, but
  280. # symbolic links and aliases may be used to point to other locations.
  281. #
  282. DocumentRoot /volume/www
  283.  
  284. #
  285. # Each directory to which Apache has access, can be configured with respect
  286. # to which services and features are allowed and/or disabled in that
  287. # directory (and its subdirectories).
  288. #
  289. # First, we configure the "default" to be a very restrictive set of
  290. # permissions.  
  291. #
  292. <Directory />
  293.     Options SymLinksIfOwnerMatch
  294.     AllowOverride None
  295. </Directory>
  296.  
  297. #
  298. # Note that from this point forward you must specifically allow
  299. # particular features to be enabled - so if something's not working as
  300. # you might expect, make sure that you have specifically enabled it
  301. # below.
  302. #
  303.  
  304. #
  305. # This should be changed to whatever you set DocumentRoot to.
  306. #
  307.  
  308. #
  309. # UserDir: The name of the directory which is appended onto a user's home
  310. # directory if a ~user request is received.
  311. #
  312. <IfModule mod_userdir.c>
  313.     UserDir public_html
  314. #
  315. # Control access to UserDir directories.  The following is an example
  316. # for a site where these directories are restricted to read-only.
  317. #
  318.     <Directory /home/*/public_html>
  319.         AllowOverride FileInfo AuthConfig Limit
  320.         Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  321.         <Limit GET POST OPTIONS PROPFIND>
  322.             Order allow,deny
  323.             Allow from all
  324.         </Limit>
  325.         <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
  326.             Order deny,allow
  327.             Deny from all
  328.         </Limit>
  329.     </Directory>
  330. </IfModule>
  331.  
  332. #
  333. # DirectoryIndex: Name of the file or files to use as a pre-written HTML
  334. # directory index.  Separate multiple entries with spaces.
  335. #
  336. <IfModule mod_dir.c>
  337.     DirectoryIndex index.html index.htm index.shtml index.cgi index.php
  338. </IfModule>
  339.  
  340. #
  341. # AccessFileName: The name of the file to look for in each directory
  342. # for access control information.
  343. #
  344. AccessFileName .htaccess
  345.  
  346. #
  347. # The following lines prevent .htaccess files from being viewed by
  348. # Web clients.  Since .htaccess files often contain authorization
  349. # information, access is disallowed for security reasons.  Comment
  350. # these lines out if you want Web visitors to see the contents of
  351. # .htaccess files.  If you change the AccessFileName directive above,
  352. # be sure to make the corresponding changes here.
  353. #
  354. # Also, folks tend to use names such as .htpasswd for password
  355. # files, so this will protect those as well.
  356. #
  357. <Files ~ "^\.ht">
  358.     Order allow,deny
  359.     Deny from all
  360. </Files>
  361.  
  362. #
  363. # CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
  364. # document that was negotiated on the basis of content. This asks proxy
  365. # servers not to cache the document. Uncommenting the following line disables
  366. # this behavior, and proxies will be allowed to cache the documents.
  367. #
  368. #CacheNegotiatedDocs
  369.  
  370. #
  371. # UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
  372. # Apache needs to construct a self-referencing URL (a URL that refers back
  373. # to the server the response is coming from) it will use ServerName and
  374. # Port to form a "canonical" name.  With this setting off, Apache will
  375. # use the hostname:port that the client supplied, when possible.  This
  376. # also affects SERVER_NAME and SERVER_PORT in CGI scripts.
  377. #
  378. UseCanonicalName Off
  379.  
  380. #
  381. # TypesConfig describes where the mime.types file (or equivalent) is
  382. # to be found.
  383. #
  384. TypesConfig /etc/mime.types
  385.  
  386. #
  387. # DefaultType is the default MIME type the server will use for a document
  388. # if it cannot otherwise determine one, such as from filename extensions.
  389. # If your server contains mostly text or HTML documents, "text/plain" is
  390. # a good value.  If most of your content is binary, such as applications
  391. # or images, you may want to use "application/octet-stream" instead to
  392. # keep browsers from trying to display binary files as though they are
  393. # text.
  394. #
  395. DefaultType text/plain
  396.  
  397. #
  398. # The mod_mime_magic module allows the server to use various hints from the
  399. # contents of the file itself to determine its type.  The MIMEMagicFile
  400. # directive tells the module where the hint definitions are located.
  401. # mod_mime_magic is not part of the default server (you have to add
  402. # it yourself with a LoadModule [see the DSO paragraph in the 'Global
  403. # Environment' section], or recompile the server and include mod_mime_magic
  404. # as part of the configuration), so it's enclosed in an <IfModule> container.
  405. # This means that the MIMEMagicFile directive will only be processed if the
  406. # module is part of the server.
  407. #
  408. <IfModule mod_mime_magic.c>
  409.     MIMEMagicFile /usr/share/misc/file/magic.mime
  410. </IfModule>
  411.  
  412. #
  413. # HostnameLookups: Log the names of clients or just their IP addresses
  414. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  415. # The default is off because it'd be overall better for the net if people
  416. # had to knowingly turn this feature on, since enabling it means that
  417. # each client request will result in AT LEAST one lookup request to the
  418. # nameserver.
  419. #
  420. HostnameLookups Off
  421.  
  422. # Note that Log files are now rotated by logrotate, not by apache itself.
  423. # This means that apache no longer attempts to magically determine
  424. # where your log files are kept; you have to fill out stanzas in
  425. # /etc/logrotate.d/apache yourself.
  426.  
  427. #
  428. # ErrorLog: The location of the error log file.
  429. # If you do not specify an ErrorLog directive within a <VirtualHost>
  430. # container, error messages relating to that virtual host will be
  431. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  432. # container, that host's errors will be logged there and not here.
  433. #
  434. ErrorLog /var/log/apache/error.log
  435.  
  436. #
  437. # LogLevel: Control the number of messages logged to the error_log.
  438. # Possible values include: debug, info, notice, warn, error, crit,
  439. # alert, emerg.
  440. #
  441. LogLevel warn
  442.  
  443. #
  444. # The following directives define some format nicknames for use with
  445. # a CustomLog directive (see below).
  446. #
  447. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\" %T %v" full
  448. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\" %P %T" debug
  449. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\"" combined
  450. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{forensic-id}n\"" forensic
  451. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  452. LogFormat "%{Referer}i -> %U" referer
  453. LogFormat "%{User-agent}i" agent
  454.  
  455. #
  456. # The location and format of the access logfile (Common Logfile Format).
  457. # If you do not define any access logfiles within a <VirtualHost>
  458. # container, they will be logged here.  Contrariwise, if you *do*
  459. # define per-<VirtualHost> access logfiles, transactions will be
  460. # logged therein and *not* in this file.
  461. #
  462. #CustomLog /var/log/apache/access.log common
  463.  
  464. #
  465. # If you would like to have agent and referer logfiles, uncomment the
  466. # following directives.
  467. #
  468. #CustomLog /var/log/apache/referer.log referer
  469. #CustomLog /var/log/apache/agent.log agent
  470.  
  471. #
  472. # If you prefer a single logfile with access, agent, referer and forensic
  473. # information (Combined Logfile Format) you can use the following directive.
  474. #
  475. CustomLog /var/log/apache/access.log combined
  476.  
  477. <IfModule mod_log_forensic.c>
  478.  ForensicLog /var/log/apache/forensic.log
  479. </IfModule>
  480.  
  481. #
  482. # Debugging information. With apache 1.3.31 two new debugging modules have been
  483. # introduced to facilitate this task: mod_backtrace and mod_whatkilledus.
  484. # They must NOT be used in production environment if not for debugging!
  485. # You must know what you are doing before enabling the modules and
  486. # uncommenting the following lines.
  487. #
  488. <IfModule mod_backtrace.c>
  489.  EnableExceptionHook On
  490.  #
  491.  # Backtrace logs are written to error.log but optionally they can be
  492.  # redirected to a different file.
  493.  #
  494.  # BacktraceLog /var/log/apache/backtrace.log
  495.  #
  496. </IfModule>
  497.  
  498. <IfModule mod_whatkilledus.c>
  499.  EnableExceptionHook On
  500.  #
  501.  # Whatkilledus logs are written to error.log but optionally they can be
  502.  # redirected to a different file.
  503.  #
  504.  # WhatKilledUsLog /var/log/apache/whatkilledus.log
  505.  #
  506. </IfModule>
  507.  
  508. #
  509. # Optionally add a line containing the server version and virtual host
  510. # name to server-generated pages (error documents, FTP directory listings,
  511. # mod_status and mod_info output etc., but not CGI generated documents).
  512. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  513. # Set to one of:  On | Off | EMail
  514. #
  515. ServerSignature On
  516.  
  517. #
  518. # This directive controls whether Server response header field which is
  519. # sent back to clients includes a description of the generic OS-type of
  520. # the server as well as information about compiled-in modules.
  521. # Set to one of: Prod[uctOnly] | Min[imal] | OS | Full
  522. # If the directive is not specified the default is set to Full.
  523. #
  524. #ServerTokens Full
  525.  
  526. #
  527. # Aliases: Add here as many aliases as you need (with no limit). The format is
  528. # Alias fakename realname
  529. #
  530. # Note that if you include a trailing / on fakename then the server will
  531. # require it to be present in the URL.  So "/icons" isn't aliased in this
  532. # example, only "/icons/"..
  533. #
  534.  
  535. <IfModule mod_alias.c>
  536.     Alias /icons/ /usr/share/apache/icons/
  537.  
  538.     <Directory /usr/share/apache/icons>
  539.          Options Indexes MultiViews
  540.          AllowOverride None
  541.          Order allow,deny
  542.          Allow from all
  543.     </Directory>
  544.  
  545.     Alias /images/ /usr/share/images/
  546.  
  547.     <Directory /usr/share/images>
  548.          Options MultiViews
  549.          AllowOverride None
  550.          Order allow,deny
  551.          Allow from all
  552.     </Directory>
  553. </IfModule>
  554.  
  555. #
  556. # ScriptAlias: This controls which directories contain server scripts.
  557. # ScriptAliases are essentially the same as Aliases, except that
  558. # documents in the realname directory are treated as applications and
  559. # run by the server when requested rather than as documents sent to the client.
  560. # The same rules about trailing "/" apply to ScriptAlias directives as to
  561. # Alias.
  562. #
  563. <IfModule mod_alias.c>
  564.     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  565.  
  566. #
  567. # "/usr/lib/cgi-bin" could be changed to whatever your ScriptAliased
  568. # CGI directory exists, if you have that configured.
  569. #
  570.     <Directory /usr/lib/cgi-bin/>
  571.         AllowOverride None
  572.         Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
  573.         Order allow,deny
  574.         Allow from all
  575.     </Directory>
  576. </IfModule>
  577.  
  578. #
  579. # Redirect allows you to tell clients about documents which used to exist in
  580. # your server's namespace, but do not anymore. This allows you to tell the
  581. # clients where to look for the relocated document.
  582. # Format: Redirect old-URI new-URL
  583. #
  584.  
  585. #
  586. # Directives controlling the display of server-generated directory listings.
  587. #
  588.  
  589. <IfModule mod_autoindex.c>
  590.  
  591.     #
  592.     # FancyIndexing: whether you want fancy directory indexing or standard
  593.     #
  594.     IndexOptions FancyIndexing NameWidth=*
  595.  
  596.     #
  597.     # AddIcon* directives tell the server which icon to show for different
  598.     # files or filename extensions.  These are only displayed for
  599.     # FancyIndexed directories.
  600.     #
  601.     AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  602.  
  603.     AddIconByType (TXT,/icons/text.gif) text/*
  604.     AddIconByType (IMG,/icons/image2.gif) image/*
  605.     AddIconByType (SND,/icons/sound2.gif) audio/*
  606.     AddIconByType (VID,/icons/movie.gif) video/*
  607.  
  608.     AddIcon /icons/binary.gif .bin .exe
  609.     AddIcon /icons/binhex.gif .hqx
  610.     AddIcon /icons/tar.gif .tar
  611.     AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  612.     AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  613.     AddIcon /icons/a.gif .ps .ai .eps
  614.     AddIcon /icons/layout.gif .html .shtml .htm .pdf
  615.     AddIcon /icons/text.gif .txt
  616.     AddIcon /icons/c.gif .c
  617.     AddIcon /icons/p.gif .pl .py
  618.     AddIcon /icons/f.gif .for
  619.     AddIcon /icons/dvi.gif .dvi
  620.     AddIcon /icons/uuencoded.gif .uu
  621.     AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  622.     AddIcon /icons/tex.gif .tex
  623.     AddIcon /icons/bomb.gif core
  624.     AddIcon /icons/deb.gif .deb
  625.  
  626.     AddIcon /icons/back.gif ..
  627.     AddIcon /icons/hand.right.gif README
  628.     AddIcon /icons/folder.gif ^^DIRECTORY^^
  629.     AddIcon /icons/blank.gif ^^BLANKICON^^
  630.  
  631.     #
  632.     # DefaultIcon: which icon to show for files which do not have an icon
  633.     # explicitly set.
  634.     #
  635.     DefaultIcon /icons/unknown.gif
  636.  
  637.     #
  638.     # AddDescription: allows you to place a short description after a file in
  639.     # server-generated indexes.  These are only displayed for FancyIndexed
  640.     # directories.
  641.     # Format: AddDescription "description" filename
  642.     #
  643.     #AddDescription "GZIP compressed document" .gz
  644.     #AddDescription "tar archive" .tar
  645.     #AddDescription "GZIP compressed tar archive" .tgz
  646.  
  647.     #
  648.     # ReadmeName: the name of the README file the server will look for by
  649.     # default, and append to directory listings.
  650.     #
  651.     # HeaderName: the name of a file which should be prepended to
  652.     # directory indexes.
  653.     #
  654.     # The module recognize only 2 kind of mime-types, text/html and
  655.     # text/*, but the only method it has to identify them is via
  656.     # the filename extension. The default is to include and display
  657.     # html files.
  658.     #
  659.     ReadmeName README.html
  660.     HeaderName HEADER.html
  661.  
  662.     # Otherwise you can comment the 2 lines above and uncomment
  663.     # the 2 below in order to display plain text files.
  664.     #
  665.     # ReadmeName README.txt
  666.     # HeaderName HEADER.txt
  667.  
  668.     #
  669.     # IndexIgnore: a set of filenames which directory indexing should ignore
  670.     # and not include in the listing.  Shell-style wildcarding is permitted.
  671.     #
  672.     IndexIgnore .??* *~ *# HEADER.html HEADER.txt RCS CVS *,v *,t
  673.  
  674.     # Uncomment the following IndexIgnore line to add README.* to the file
  675.     # list that will not be displayed by mod_autoindex.
  676.     # It is not enabled by default on Debian system to permit users to properly
  677.     # browse Debian documentation (/doc/)
  678.     #
  679.     #IndexIgnore README.*
  680.  
  681. </IfModule>
  682.  
  683. #
  684. # Document types.
  685. #
  686. <IfModule mod_mime.c>
  687.  
  688.     # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+)
  689.     # uncompress information on the fly. Note: Not all browsers support
  690.     # this.  Despite the name similarity, the following Add* directives
  691.     # have nothing to do with the FancyIndexing customization
  692.     # directives above.
  693.  
  694.     AddEncoding x-compress Z
  695.     AddEncoding x-gzip gz tgz
  696.  
  697.     #
  698.     # AddLanguage: allows you to specify the language of a document. You can
  699.     # then use content negotiation to give a browser a file in a language
  700.     # it can understand.
  701.     #
  702.     # Note 1: The suffix does not have to be the same as the language
  703.     # keyword --- those with documents in Polish (whose net-standard
  704.     # language code is pl) may wish to use "AddLanguage pl .po" to
  705.     # avoid the ambiguity with the common suffix for perl scripts.
  706.     #
  707.     # Note 2: The example entries below illustrate that in quite
  708.     # some cases the two character 'Language' abbriviation is not
  709.     # identical to the two character 'Country' code for its country,
  710.     # E.g. 'Danmark/dk' versus 'Danish/da'.
  711.     #
  712.     # Note 3: There is 'work in progress' to fix this and get
  713.     # the reference data for rfc3066 cleaned up.
  714.     #
  715.     # Danish (da) - Dutch (nl) - English (en) - Estonian (ee)
  716.     # French (fr) - German (de) - Greek-Modern (el)
  717.     # Italian (it) - Portugese (pt) - Luxembourgeois (lb)
  718.     # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cs)
  719.     # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
  720.     #
  721.     AddLanguage da .dk
  722.     AddLanguage nl .nl
  723.     AddLanguage en .en
  724.     AddLanguage et .ee
  725.     AddLanguage fr .fr
  726.     AddLanguage de .de
  727.     AddLanguage el .el
  728.     AddLanguage it .it
  729.     AddLanguage ja .ja
  730.     AddCharset ISO-2022-JP .jis
  731.     AddLanguage pl .po
  732.     AddCharset ISO-8859-2 .iso-pl
  733.     AddLanguage pt .pt
  734.     AddLanguage pt-br .pt-br
  735.     AddLanguage lb .lu
  736.     AddLanguage ca .ca
  737.     AddLanguage es .es
  738.     AddLanguage sv .se
  739.     AddLanguage cs .cz
  740.  
  741.     # LanguagePriority: allows you to give precedence to some languages
  742.     # in case of a tie during content negotiation.
  743.     #
  744.     # Just list the languages in decreasing order of preference. We have
  745.     # more or less alphabetized them here. You probably want to change
  746.     # this.
  747.     #
  748.     <IfModule mod_negotiation.c>
  749.         LanguagePriority en da nl et fr de el it ja pl pt pt-br lb ca es sv
  750.     </IfModule>
  751.  
  752.     #
  753.     # AddType allows you to tweak mime.types without actually editing
  754.     # it, or to make certain files to be certain types.
  755.     #
  756.     # For example, the PHP 3.x module (not part of the Apache
  757.     # distribution - see http://www.php.net) will typically use:
  758.     #
  759.     #AddType application/x-httpd-php3 .php3
  760.     #AddType application/x-httpd-php3-source .phps
  761.     #
  762.     # And for PHP 4.x, use:
  763.     #
  764.     #AddType application/x-httpd-php .php
  765.     #AddType application/x-httpd-php-source .phps
  766.  
  767.     AddType application/x-tar .tgz
  768.     AddType image/bmp .bmp
  769.  
  770.     # hdml
  771.     AddType text/x-hdml .hdml
  772.  
  773.     #
  774.     # AddHandler allows you to map certain file extensions to "handlers",
  775.     # actions unrelated to filetype. These can be either built into
  776.     # the server or added with the Action command (see below).
  777.     #
  778.     # If you want to use server side includes, or CGI outside
  779.     # ScriptAliased directories, uncomment the following lines.
  780.     #
  781.     # To use CGI scripts:
  782.     #
  783.     #AddHandler cgi-script .cgi .sh .pl
  784.  
  785.     #
  786.     # To use server-parsed HTML files mod_include has to be enabled.
  787.     #
  788.     <IfModule mod_include.c>
  789.      AddType text/html .shtml
  790.      AddHandler server-parsed .shtml
  791.     </IfModule>
  792.  
  793.     #
  794.     # Uncomment the following line to enable Apache's send-asis HTTP
  795.     # file feature.
  796.     #
  797.     #AddHandler send-as-is asis
  798.  
  799.     #
  800.     # If you wish to use server-parsed imagemap files, use
  801.     #
  802.     #AddHandler imap-file map
  803.  
  804.     #
  805.     # To enable type maps, you might want to use
  806.     #
  807.     #AddHandler type-map var
  808.  
  809. </IfModule>
  810. # End of document types.
  811.  
  812. # Default charset to iso-8859-1 (http://www.apache.org/info/css-security/).
  813.  
  814. AddDefaultCharset on
  815.  
  816. #
  817. # Action: lets you define media types that will execute a script whenever
  818. # a matching file is called. This eliminates the need for repeated URL
  819. # pathnames for oft-used CGI file processors.
  820. # Format: Action media/type /cgi-script/location
  821. # Format: Action handler-name /cgi-script/location
  822. #
  823.  
  824. #
  825. # MetaDir: specifies the name of the directory in which Apache can find
  826. # meta information files. These files contain additional HTTP headers
  827. # to include when sending the document
  828. #
  829. #MetaDir .web
  830.  
  831. #
  832. # MetaSuffix: specifies the file name suffix for the file containing the
  833. # meta information.
  834. #
  835. #MetaSuffix .meta
  836.  
  837. #
  838. # Customizable error response (Apache style)
  839. #  these come in three flavors
  840. #
  841. #    1) plain text
  842. #ErrorDocument 500 "The server made a boo boo.
  843. #  n.b.  the (") marks it as text, it does not get output
  844. #
  845. #    2) local redirects
  846. #ErrorDocument 404 /missing.html
  847. #  to redirect to local URL /missing.html
  848. #ErrorDocument 404 /cgi-bin/missing_handler.pl
  849. #  N.B.: You can redirect to a script or a document using server-side-includes.
  850. #
  851. #    3) external redirects
  852. #ErrorDocument 402 http://some.other_server.com/subscription_info.html
  853. #  N.B.: Many of the environment variables associated with the original
  854. #  request will *not* be available to such a script.
  855.  
  856. <IfModule mod_setenvif.c>
  857.     #
  858.     # The following directives modify normal HTTP response behavior.
  859.     # The first directive disables keepalive for Netscape 2.x and browsers that
  860.     # spoof it. There are known problems with these browser implementations.
  861.     # The second directive is for Microsoft Internet Explorer 4.0b2
  862.     # which has a broken HTTP/1.1 implementation and does not properly
  863.     # support keepalive when it is used on 301 or 302 (redirect) responses.
  864.     #
  865.     BrowserMatch "Mozilla/2" nokeepalive
  866.     BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  867.  
  868.     #
  869.     # The following directive disables HTTP/1.1 responses to browsers which
  870.     # are in violation of the HTTP/1.0 spec by not being able to grok a
  871.     # basic 1.1 response.
  872.     #
  873.     BrowserMatch "RealPlayer 4\.0" force-response-1.0
  874.     BrowserMatch "Java/1\.0" force-response-1.0
  875.     BrowserMatch "JDK/1\.0" force-response-1.0
  876. </IfModule>
  877.  
  878.  
  879. # If the perl module is installed, this will be enabled.
  880. <IfModule mod_perl.c>
  881.   <IfModule mod_alias.c>
  882.    Alias /perl/ /var/www/perl/
  883.   </IfModule>
  884.   <Location /perl>
  885.     SetHandler perl-script
  886.     PerlHandler Apache::Registry
  887.     Options +ExecCGI
  888.   </Location>
  889. </IfModule>
  890.  
  891. #
  892. # Allow http put (such as Netscape Gold's publish feature)
  893. # Use htpasswd to generate /etc/apache/passwd.
  894. # You must unremark these two lines at the top of this file as well:
  895. #LoadModule put_module          modules/mod_put.so
  896. #AddModule mod_put.c
  897. #
  898. #<IfModule mod_alias.c>
  899. # Alias /upload /tmp
  900. #</IfModule>
  901. #<Location /upload>
  902. #    EnablePut On
  903. #    AuthType Basic
  904. #    AuthName Temporary
  905. #    AuthUserFile /etc/apache/passwd
  906. #    EnableDelete Off
  907. #    umask 007
  908. #    <Limit PUT>
  909. #       require valid-user
  910. #    </Limit>
  911. #</Location>
  912.  
  913. #
  914. # Allow server status reports, with the URL of http://servername/server-status
  915. # Change the ".your_domain.com" to match your domain to enable.
  916. #
  917. #<Location /server-status>
  918. #    SetHandler server-status
  919. #    Order deny,allow
  920. #    Deny from all
  921. #    Allow from .your_domain.com
  922. #</Location>
  923.  
  924. #
  925. # Allow remote server configuration reports, with the URL of
  926. #  http://servername/server-info (requires that mod_info.c be loaded).
  927. # Change the ".your_domain.com" to match your domain to enable.
  928. #
  929. #<Location /server-info>
  930. #    SetHandler server-info
  931. #    Order deny,allow
  932. #    Deny from all
  933. #    Allow from .your_domain.com
  934. #</Location>
  935.  
  936. # Allow access to local system documentation from localhost.
  937. # (Debian Policy assumes /usr/share/doc is "/doc/", at least from the localhost.)
  938. <IfModule mod_alias.c>
  939.  Alias /doc/ /usr/share/doc/
  940. </IfModule>
  941.  
  942. <Location /doc>
  943.   order deny,allow
  944.   deny from all
  945.   allow from 127.0.0.0/255.0.0.0
  946.   Options Indexes FollowSymLinks MultiViews
  947. </Location>
  948.  
  949. #
  950. # There have been reports of people trying to abuse an old bug from pre-1.1
  951. # days.  This bug involved a CGI script distributed as a part of Apache.
  952. # By uncommenting these lines you can redirect these attacks to a logging
  953. # script on phf.apache.org.  Or, you can record them yourself, using the script
  954. # support/phf_abuse_log.cgi.
  955. #
  956. #<Location /cgi-bin/phf*>
  957. #    Deny from all
  958. #    ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
  959. #</Location>
  960.  
  961. <IfModule mod_proxy.c>
  962.     #
  963.     # Proxy Server directives. Uncomment the following lines to
  964.     # enable the proxy server:
  965.     #
  966.     #ProxyRequests On
  967.  
  968.     #<Directory proxy:*>
  969.     #    Order deny,allow
  970.     #    Deny from all
  971.     #    Allow from .your_domain.com
  972.     #</Directory>
  973.  
  974.  
  975.     #
  976.     # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  977.     # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  978.     # Set to one of: Off | On | Full | Block
  979.     #
  980.     #ProxyVia On
  981.  
  982.     #
  983.     # To enable the cache as well, edit and uncomment the following lines:
  984.     # (no cacheing without CacheRoot)
  985.     #
  986.     #CacheRoot "/var/cache/apache"
  987.     #CacheSize 5
  988.     #CacheGcInterval 4
  989.     #CacheMaxExpire 24
  990.     #CacheLastModifiedFactor 0.1
  991.     #CacheDefaultExpire 1
  992.     #NoCache a_domain.com another_domain.edu joes.garage_sale.com
  993.  
  994. </IfModule>
  995. # End of proxy directives.
  996.  
  997. ### Section 3: Virtual Hosts
  998. #
  999. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  1000. # machine you can setup VirtualHost containers for them.
  1001. # Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
  1002. # for further details before you try to setup virtual hosts.
  1003. # You may use the command line option '-S' to verify your virtual host
  1004. # configuration.
  1005.  
  1006. #
  1007. # If you want to use name-based virtual hosts you need to define at
  1008. # least one IP address (and port number) for them.
  1009. #
  1010. #NameVirtualHost 12.34.56.78:80
  1011. #NameVirtualHost 12.34.56.78
  1012.  
  1013. #
  1014. # VirtualHost example:
  1015. # Almost any Apache directive may go into a VirtualHost container.
  1016. #
  1017. #<VirtualHost ip.address.of.host.some_domain.com>
  1018. #    ServerAdmin webmaster@host.some_domain.com
  1019. #    DocumentRoot /www/docs/host.some_domain.com
  1020. #    ServerName host.some_domain.com
  1021. #    ErrorLog logs/host.some_domain.com-error.log
  1022. #    CustomLog logs/host.some_domain.com-access.log common
  1023. #</VirtualHost>
  1024.  
  1025. #<VirtualHost _default_:*>
  1026. #</VirtualHost>
  1027.  
  1028. # Automatically added by the post-installation script
  1029. # as part of the transition to a config directory layout
  1030. # similar to apache2, and that will help users to migrate
  1031. # from apache to apache2 or revert back easily
  1032. Include /etc/apache/conf.d
  1033. <Directory "/volume/www">
  1034. Options -Indexes Includes FollowSymLinks
  1035. AllowOverride all
  1036. </Directory>
  1037. [/code]
  1038.  
  1039. Bitte ;)
  1040. Auch wenn ich MultiViews entferne, geht's nicht.

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN