Guest User

Untitled

a guest
Apr 11th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.32 KB | None | 0 0
  1. #
  2. # This is the main Apache server configuration file. It contains the
  3. # configuration directives that give the server its instructions.
  4. # See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
  5. # In particular, see
  6. # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
  7. # for a discussion of each configuration directive.
  8. #
  9. #
  10. # Do NOT simply read the instructions in here without understanding
  11. # what they do. They're here only as hints or reminders. If you are unsure
  12. # consult the online docs. You have been warned.
  13. #
  14. # The configuration directives are grouped into three basic sections:
  15. # 1. Directives that control the operation of the Apache server process as a
  16. # whole (the 'global environment').
  17. # 2. Directives that define the parameters of the 'main' or 'default' server,
  18. # which responds to requests that aren't handled by a virtual host.
  19. # These directives also provide default values for the settings
  20. # of all virtual hosts.
  21. # 3. Settings for virtual hosts, which allow Web requests to be sent to
  22. # different IP addresses or hostnames and have them handled by the
  23. # same Apache server process.
  24. #
  25. # Configuration and logfile names: If the filenames you specify for many
  26. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  27. # server will use that explicit path. If the filenames do *not* begin
  28. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  29. # with ServerRoot set to "/etc/httpd" will be interpreted by the
  30. # server as "/etc/httpd/logs/foo.log".
  31. #
  32.  
  33. ### Section 1: Global Environment
  34. #
  35. # The directives in this section affect the overall operation of Apache,
  36. # such as the number of concurrent requests it can handle or where it
  37. # can find its configuration files.
  38. #
  39.  
  40. #
  41. # Don't give away too much information about all the subcomponents
  42. # we are running. Comment out this line if you don't mind remote sites
  43. # finding out what major optional modules you are running
  44. ServerTokens OS
  45.  
  46. #
  47. # ServerRoot: The top of the directory tree under which the server's
  48. # configuration, error, and log files are kept.
  49. #
  50. # NOTE! If you intend to place this on an NFS (or otherwise network)
  51. # mounted filesystem then please read the LockFile documentation
  52. # (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
  53. # you will save yourself a lot of trouble.
  54. #
  55. # Do NOT add a slash at the end of the directory path.
  56. #
  57. ServerRoot "/etc/httpd"
  58.  
  59. #
  60. # PidFile: The file in which the server should record its process
  61. # identification number when it starts.
  62. #
  63. PidFile run/httpd.pid
  64.  
  65. #
  66. # Timeout: The number of seconds before receives and sends time out.
  67. #
  68. Timeout 120
  69.  
  70. #
  71. # KeepAlive: Whether or not to allow persistent connections (more than
  72. # one request per connection). Set to "Off" to deactivate.
  73. #
  74. KeepAlive Off
  75.  
  76. #
  77. # MaxKeepAliveRequests: The maximum number of requests to allow
  78. # during a persistent connection. Set to 0 to allow an unlimited amount.
  79. # We recommend you leave this number high, for maximum performance.
  80. #
  81. MaxKeepAliveRequests 100
  82.  
  83. #
  84. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  85. # same client on the same connection.
  86. #
  87. KeepAliveTimeout 15
  88.  
  89. ##
  90. ## Server-Pool Size Regulation (MPM specific)
  91. ##
  92.  
  93. # prefork ITK
  94.  
  95. # AssignUserID: Takes two parameters, uid and gid (or really, user name and
  96. # group name); specifies what uid and gid the vhost will run as
  97. # (after parsing the request etc., of course). Note that if you do not assign
  98. # a user ID, the default one from Apache will be used.
  99.  
  100. # MaxClientsVHost: A separate MaxClients for the vhost. This can be useful if,
  101. # say, half of your vhosts depend on some NFS server (like on our setup);
  102. # if the NFS server goes down, you do not want the children waiting forever
  103. # on NFS to take the non-NFS-dependent hosts down. This can thus act as a
  104. # safety measure, giving "server too busy" on the NFS-dependent vhosts
  105. # while keeping the other ones happily running. (Of course, you could use
  106. # it to simply keep one site from eating way too much resources, but there
  107. # are probably better ways of doing that.)
  108.  
  109. # NiceValue: Lets you nice some requests down, to give them less CPU time.
  110.  
  111. <IfModule itk.c>
  112. StartServers 8
  113. MinSpareServers 5
  114. MaxSpareServers 20
  115. ServerLimit 256
  116. MaxClients 256
  117. MaxRequestsPerChild 4000
  118. </IfModule>
  119.  
  120. # prefork MPM
  121. # StartServers: number of server processes to start
  122. # MinSpareServers: minimum number of server processes which are kept spare
  123. # MaxSpareServers: maximum number of server processes which are kept spare
  124. # ServerLimit: maximum value for MaxClients for the lifetime of the server
  125. # MaxClients: maximum number of server processes allowed to start
  126. # MaxRequestsPerChild: maximum number of requests a server process serves
  127. <IfModule prefork.c>
  128. StartServers 4
  129. MinSpareServers 3
  130. MaxSpareServers 10
  131. ServerLimit 30
  132. MaxClients 30
  133. MaxRequestsPerChild 2000
  134. </IfModule>
  135.  
  136. # worker MPM
  137. # StartServers: initial number of server processes to start
  138. # MaxClients: maximum number of simultaneous client connections
  139. # MinSpareThreads: minimum number of worker threads which are kept spare
  140. # MaxSpareThreads: maximum number of worker threads which are kept spare
  141. # ThreadsPerChild: constant number of worker threads in each server process
  142. # MaxRequestsPerChild: maximum number of requests a server process serves
  143. <IfModule worker.c>
  144. StartServers 2
  145. MaxClients 150
  146. MinSpareThreads 25
  147. MaxSpareThreads 75
  148. ThreadsPerChild 25
  149. MaxRequestsPerChild 0
  150. </IfModule>
  151.  
  152. #
  153. # Listen: Allows you to bind Apache to specific IP addresses and/or
  154. # ports, in addition to the default. See also the <VirtualHost>
  155. # directive.
  156. #
  157. # Change this to Listen on specific IP addresses as shown below to
  158. # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
  159. #
  160. #Listen 12.34.56.78:80
  161. #Listen 80
  162.  
  163. #
  164. # Dynamic Shared Object (DSO) Support
  165. #
  166. # To be able to use the functionality of a module which was built as a DSO you
  167. # have to place corresponding `LoadModule' lines at this location so the
  168. # directives contained in it are actually available _before_ they are used.
  169. # Statically compiled modules (those listed by `httpd -l') do not need
  170. # to be loaded here.
  171. #
  172. # Example:
  173. # LoadModule foo_module modules/mod_foo.so
  174. #
  175. LoadModule auth_basic_module modules/mod_auth_basic.so
  176. LoadModule auth_digest_module modules/mod_auth_digest.so
  177. LoadModule authn_file_module modules/mod_authn_file.so
  178. LoadModule authn_alias_module modules/mod_authn_alias.so
  179. LoadModule authn_anon_module modules/mod_authn_anon.so
  180. LoadModule authn_dbm_module modules/mod_authn_dbm.so
  181. LoadModule authn_default_module modules/mod_authn_default.so
  182. LoadModule authz_host_module modules/mod_authz_host.so
  183. LoadModule authz_user_module modules/mod_authz_user.so
  184. LoadModule authz_owner_module modules/mod_authz_owner.so
  185. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  186. LoadModule authz_dbm_module modules/mod_authz_dbm.so
  187. LoadModule authz_default_module modules/mod_authz_default.so
  188. LoadModule ldap_module modules/mod_ldap.so
  189. LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  190. LoadModule include_module modules/mod_include.so
  191. LoadModule log_config_module modules/mod_log_config.so
  192. LoadModule logio_module modules/mod_logio.so
  193. LoadModule env_module modules/mod_env.so
  194. LoadModule ext_filter_module modules/mod_ext_filter.so
  195. LoadModule mime_magic_module modules/mod_mime_magic.so
  196. LoadModule expires_module modules/mod_expires.so
  197. LoadModule deflate_module modules/mod_deflate.so
  198. LoadModule headers_module modules/mod_headers.so
  199. LoadModule usertrack_module modules/mod_usertrack.so
  200. LoadModule setenvif_module modules/mod_setenvif.so
  201. LoadModule mime_module modules/mod_mime.so
  202. LoadModule dav_module modules/mod_dav.so
  203. LoadModule status_module modules/mod_status.so
  204. LoadModule autoindex_module modules/mod_autoindex.so
  205. LoadModule info_module modules/mod_info.so
  206. LoadModule dav_fs_module modules/mod_dav_fs.so
  207. LoadModule vhost_alias_module modules/mod_vhost_alias.so
  208. LoadModule negotiation_module modules/mod_negotiation.so
  209. LoadModule dir_module modules/mod_dir.so
  210. LoadModule actions_module modules/mod_actions.so
  211. LoadModule speling_module modules/mod_speling.so
  212. LoadModule userdir_module modules/mod_userdir.so
  213. LoadModule alias_module modules/mod_alias.so
  214. LoadModule rewrite_module modules/mod_rewrite.so
  215. LoadModule proxy_module modules/mod_proxy.so
  216. LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  217. LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  218. LoadModule proxy_http_module modules/mod_proxy_http.so
  219. LoadModule proxy_connect_module modules/mod_proxy_connect.so
  220. LoadModule cache_module modules/mod_cache.so
  221. LoadModule suexec_module modules/mod_suexec.so
  222. LoadModule disk_cache_module modules/mod_disk_cache.so
  223. LoadModule file_cache_module modules/mod_file_cache.so
  224. LoadModule mem_cache_module modules/mod_mem_cache.so
  225. LoadModule cgi_module modules/mod_cgi.so
  226. LoadModule ssl_module modules/mod_ssl.so
  227.  
  228. #
  229. # The following modules are not loaded by default:
  230. #
  231. #LoadModule cern_meta_module modules/mod_cern_meta.so
  232. #LoadModule asis_module modules/mod_asis.so
  233.  
  234. #
  235. # Load config files from the config directory "/etc/httpd/conf.d".
  236. #
  237. Include conf.d/*.conf
  238.  
  239. #
  240. # ExtendedStatus controls whether Apache will generate "full" status
  241. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  242. # Off) when the "server-status" handler is called. The default is Off.
  243. #
  244. #ExtendedStatus On
  245.  
  246. #
  247. # If you wish httpd to run as a different user or group, you must run
  248. # httpd as root initially and it will switch.
  249. #
  250. # User/Group: The name (or #number) of the user/group to run httpd as.
  251. # . On SCO (ODT 3) use "User nouser" and "Group nogroup".
  252. # . On HPUX you may not be able to use shared memory as nobody, and the
  253. # suggested workaround is to create a user www and use that user.
  254. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
  255. # when the value of (unsigned)Group is above 60000;
  256. # don't use Group #-1 on these systems!
  257. #
  258. User apache
  259. Group apache
  260.  
  261. ### Section 2: 'Main' server configuration
  262. #
  263. # The directives in this section set up the values used by the 'main'
  264. # server, which responds to any requests that aren't handled by a
  265. # <VirtualHost> definition. These values also provide defaults for
  266. # any <VirtualHost> containers you may define later in the file.
  267. #
  268. # All of these directives may appear inside <VirtualHost> containers,
  269. # in which case these default settings will be overridden for the
  270. # virtual host being defined.
  271. #
  272.  
  273. #
  274. # ServerAdmin: Your address, where problems with the server should be
  275. # e-mailed. This address appears on some server-generated pages, such
  276. # as error documents. e.g. [email protected]
  277. #
  278. ServerAdmin root@localhost
  279.  
  280. #
  281. # ServerName gives the name and port that the server uses to identify itself.
  282. # This can often be determined automatically, but we recommend you specify
  283. # it explicitly to prevent problems during startup.
  284. #
  285. # If this is not set to valid DNS name for your host, server-generated
  286. # redirections will not work. See also the UseCanonicalName directive.
  287. #
  288. # If your host doesn't have a registered DNS name, enter its IP address here.
  289. # You will have to access it by its address anyway, and this will make
  290. # redirections work in a sensible way.
  291. #
  292. #ServerName www.example.com:80
  293.  
  294. #
  295. # UseCanonicalName: Determines how Apache constructs self-referencing
  296. # URLs and the SERVER_NAME and SERVER_PORT variables.
  297. # When set "Off", Apache will use the Hostname and Port supplied
  298. # by the client. When set "On", Apache will use the value of the
  299. # ServerName directive.
  300. #
  301. UseCanonicalName Off
  302.  
  303. #
  304. # DocumentRoot: The directory out of which you will serve your
  305. # documents. By default, all requests are taken from this directory, but
  306. # symbolic links and aliases may be used to point to other locations.
  307. #
  308. #DocumentRoot "/var/www/html"
  309.  
  310. #
  311. # Each directory to which Apache has access can be configured with respect
  312. # to which services and features are allowed and/or disabled in that
  313. # directory (and its subdirectories).
  314. #
  315. # First, we configure the "default" to be a very restrictive set of
  316. # features.
  317. #
  318. <Directory />
  319. Options FollowSymLinks
  320. AllowOverride None
  321. </Directory>
  322.  
  323. #
  324. # Note that from this point forward you must specifically allow
  325. # particular features to be enabled - so if something's not working as
  326. # you might expect, make sure that you have specifically enabled it
  327. # below.
  328. #
  329.  
  330. #
  331. # This should be changed to whatever you set DocumentRoot to.
  332. #
  333. <Directory "/var/www/html">
  334.  
  335. #
  336. # Possible values for the Options directive are "None", "All",
  337. # or any combination of:
  338. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  339. #
  340. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  341. # doesn't give it to you.
  342. #
  343. # The Options directive is both complicated and important. Please see
  344. # http://httpd.apache.org/docs/2.2/mod/core.html#options
  345. # for more information.
  346. #
  347. Options Indexes FollowSymLinks
  348.  
  349. #
  350. # AllowOverride controls what directives may be placed in .htaccess files.
  351. # It can be "All", "None", or any combination of the keywords:
  352. # Options FileInfo AuthConfig Limit
  353. #
  354. AllowOverride None
  355.  
  356. #
  357. # Controls who can get stuff from this server.
  358. #
  359. Order allow,deny
  360. Allow from all
  361.  
  362. </Directory>
  363.  
  364. #
  365. # UserDir: The name of the directory that is appended onto a user's home
  366. # directory if a ~user request is received.
  367. #
  368. # The path to the end user account 'public_html' directory must be
  369. # accessible to the webserver userid. This usually means that ~userid
  370. # must have permissions of 711, ~userid/public_html must have permissions
  371. # of 755, and documents contained therein must be world-readable.
  372. # Otherwise, the client will only receive a "403 Forbidden" message.
  373. #
  374. # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
  375. #
  376. <IfModule mod_userdir.c>
  377. #
  378. # UserDir is disabled by default since it can confirm the presence
  379. # of a username on the system (depending on home directory
  380. # permissions).
  381. #
  382. UserDir disabled
  383.  
  384. #
  385. # To enable requests to /~user/ to serve the user's public_html
  386. # directory, remove the "UserDir disabled" line above, and uncomment
  387. # the following line instead:
  388. #
  389. #UserDir public_html
  390.  
  391. </IfModule>
  392.  
  393. #
  394. # Control access to UserDir directories. The following is an example
  395. # for a site where these directories are restricted to read-only.
  396. #
  397. #<Directory /home/*/public_html>
  398. # AllowOverride FileInfo AuthConfig Limit
  399. # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  400. # <Limit GET POST OPTIONS>
  401. # Order allow,deny
  402. # Allow from all
  403. # </Limit>
  404. # <LimitExcept GET POST OPTIONS>
  405. # Order deny,allow
  406. # Deny from all
  407. # </LimitExcept>
  408. #</Directory>
  409.  
  410. #
  411. # DirectoryIndex: sets the file that Apache will serve if a directory
  412. # is requested.
  413. #
  414. # The index.html.var file (a type-map) is used to deliver content-
  415. # negotiated documents. The MultiViews Option can be used for the
  416. # same purpose, but it is much slower.
  417. #
  418. DirectoryIndex index.html index.html.var
  419.  
  420. #
  421. # AccessFileName: The name of the file to look for in each directory
  422. # for additional configuration directives. See also the AllowOverride
  423. # directive.
  424. #
  425. AccessFileName .htaccess
  426.  
  427. #
  428. # The following lines prevent .htaccess and .htpasswd files from being
  429. # viewed by Web clients.
  430. #
  431. <Files ~ "^\.ht">
  432. Order allow,deny
  433. Deny from all
  434. </Files>
  435.  
  436. #
  437. # TypesConfig describes where the mime.types file (or equivalent) is
  438. # to be found.
  439. #
  440. TypesConfig /etc/mime.types
  441.  
  442. #
  443. # DefaultType is the default MIME type the server will use for a document
  444. # if it cannot otherwise determine one, such as from filename extensions.
  445. # If your server contains mostly text or HTML documents, "text/plain" is
  446. # a good value. If most of your content is binary, such as applications
  447. # or images, you may want to use "application/octet-stream" instead to
  448. # keep browsers from trying to display binary files as though they are
  449. # text.
  450. #
  451. DefaultType text/plain
  452.  
  453. #
  454. # The mod_mime_magic module allows the server to use various hints from the
  455. # contents of the file itself to determine its type. The MIMEMagicFile
  456. # directive tells the module where the hint definitions are located.
  457. #
  458. <IfModule mod_mime_magic.c>
  459. # MIMEMagicFile /usr/share/magic.mime
  460. MIMEMagicFile conf/magic
  461. </IfModule>
  462.  
  463. #
  464. # HostnameLookups: Log the names of clients or just their IP addresses
  465. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  466. # The default is off because it'd be overall better for the net if people
  467. # had to knowingly turn this feature on, since enabling it means that
  468. # each client request will result in AT LEAST one lookup request to the
  469. # nameserver.
  470. #
  471. HostnameLookups Off
  472.  
  473. #
  474. # EnableMMAP: Control whether memory-mapping is used to deliver
  475. # files (assuming that the underlying OS supports it).
  476. # The default is on; turn this off if you serve from NFS-mounted
  477. # filesystems. On some systems, turning it off (regardless of
  478. # filesystem) can improve performance; for details, please see
  479. # http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
  480. #
  481. #EnableMMAP off
  482.  
  483. #
  484. # EnableSendfile: Control whether the sendfile kernel support is
  485. # used to deliver files (assuming that the OS supports it).
  486. # The default is on; turn this off if you serve from NFS-mounted
  487. # filesystems. Please see
  488. # http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
  489. #
  490. #EnableSendfile off
  491.  
  492. #
  493. # ErrorLog: The location of the error log file.
  494. # If you do not specify an ErrorLog directive within a <VirtualHost>
  495. # container, error messages relating to that virtual host will be
  496. # logged here. If you *do* define an error logfile for a <VirtualHost>
  497. # container, that host's errors will be logged there and not here.
  498. #
  499. ErrorLog logs/error_log
  500.  
  501. #
  502. # LogLevel: Control the number of messages logged to the error_log.
  503. # Possible values include: debug, info, notice, warn, error, crit,
  504. # alert, emerg.
  505. #
  506. LogLevel warn
  507.  
  508. #
  509. # The following directives define some format nicknames for use with
  510. # a CustomLog directive (see below).
  511. #
  512. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  513. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  514. LogFormat "%{Referer}i -> %U" referer
  515. LogFormat "%{User-agent}i" agent
  516.  
  517. # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
  518. # requires the mod_logio module to be loaded.
  519. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  520.  
  521. #
  522. # The location and format of the access logfile (Common Logfile Format).
  523. # If you do not define any access logfiles within a <VirtualHost>
  524. # container, they will be logged here. Contrariwise, if you *do*
  525. # define per-<VirtualHost> access logfiles, transactions will be
  526. # logged therein and *not* in this file.
  527. #
  528. #CustomLog logs/access_log common
  529.  
  530. #
  531. # If you would like to have separate agent and referer logfiles, uncomment
  532. # the following directives.
  533. #
  534. #CustomLog logs/referer_log referer
  535. #CustomLog logs/agent_log agent
  536.  
  537. #
  538. # For a single logfile with access, agent, and referer information
  539. # (Combined Logfile Format), use the following directive:
  540. #
  541. CustomLog logs/access_log combined
  542.  
  543. #
  544. # Optionally add a line containing the server version and virtual host
  545. # name to server-generated pages (internal error documents, FTP directory
  546. # listings, mod_status and mod_info output etc., but not CGI generated
  547. # documents or custom error documents).
  548. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  549. # Set to one of: On | Off | EMail
  550. #
  551. ServerSignature On
  552.  
  553. #
  554. # Aliases: Add here as many aliases as you need (with no limit). The format is
  555. # Alias fakename realname
  556. #
  557. # Note that if you include a trailing / on fakename then the server will
  558. # require it to be present in the URL. So "/icons" isn't aliased in this
  559. # example, only "/icons/". If the fakename is slash-terminated, then the
  560. # realname must also be slash terminated, and if the fakename omits the
  561. # trailing slash, the realname must also omit it.
  562. #
  563. # We include the /icons/ alias for FancyIndexed directory listings. If you
  564. # do not use FancyIndexing, you may comment this out.
  565. #
  566. Alias /icons/ "/var/www/icons/"
  567.  
  568. <Directory "/var/www/icons">
  569. Options Indexes MultiViews FollowSymLinks
  570. AllowOverride None
  571. Order allow,deny
  572. Allow from all
  573. </Directory>
  574.  
  575. #
  576. # WebDAV module configuration section.
  577. #
  578. <IfModule mod_dav_fs.c>
  579. # Location of the WebDAV lock database.
  580. DAVLockDB /var/lib/dav/lockdb
  581. </IfModule>
  582.  
  583. #
  584. # ScriptAlias: This controls which directories contain server scripts.
  585. # ScriptAliases are essentially the same as Aliases, except that
  586. # documents in the realname directory are treated as applications and
  587. # run by the server when requested rather than as documents sent to the client.
  588. # The same rules about trailing "/" apply to ScriptAlias directives as to
  589. # Alias.
  590. #
  591. #ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  592.  
  593. #
  594. # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
  595. # CGI directory exists, if you have that configured.
  596. #
  597. <Directory "/var/www/cgi-bin">
  598. AllowOverride None
  599. Options None
  600. Order allow,deny
  601. Allow from all
  602. </Directory>
  603.  
  604. #
  605. # Redirect allows you to tell clients about documents which used to exist in
  606. # your server's namespace, but do not anymore. This allows you to tell the
  607. # clients where to look for the relocated document.
  608. # Example:
  609. # Redirect permanent /foo http://www.example.com/bar
  610.  
  611. #
  612. # Directives controlling the display of server-generated directory listings.
  613. #
  614.  
  615. #
  616. # IndexOptions: Controls the appearance of server-generated directory
  617. # listings.
  618. #
  619. IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
  620.  
  621. #
  622. # AddIcon* directives tell the server which icon to show for different
  623. # files or filename extensions. These are only displayed for
  624. # FancyIndexed directories.
  625. #
  626. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  627.  
  628. AddIconByType (TXT,/icons/text.gif) text/*
  629. AddIconByType (IMG,/icons/image2.gif) image/*
  630. AddIconByType (SND,/icons/sound2.gif) audio/*
  631. AddIconByType (VID,/icons/movie.gif) video/*
  632.  
  633. AddIcon /icons/binary.gif .bin .exe
  634. AddIcon /icons/binhex.gif .hqx
  635. AddIcon /icons/tar.gif .tar
  636. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  637. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  638. AddIcon /icons/a.gif .ps .ai .eps
  639. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  640. AddIcon /icons/text.gif .txt
  641. AddIcon /icons/c.gif .c
  642. AddIcon /icons/p.gif .pl .py
  643. AddIcon /icons/f.gif .for
  644. AddIcon /icons/dvi.gif .dvi
  645. AddIcon /icons/uuencoded.gif .uu
  646. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  647. AddIcon /icons/tex.gif .tex
  648. AddIcon /icons/bomb.gif core
  649.  
  650. AddIcon /icons/back.gif ..
  651. AddIcon /icons/hand.right.gif README
  652. AddIcon /icons/folder.gif ^^DIRECTORY^^
  653. AddIcon /icons/blank.gif ^^BLANKICON^^
  654.  
  655. #
  656. # DefaultIcon is which icon to show for files which do not have an icon
  657. # explicitly set.
  658. #
  659. DefaultIcon /icons/unknown.gif
  660.  
  661. #
  662. # AddDescription allows you to place a short description after a file in
  663. # server-generated indexes. These are only displayed for FancyIndexed
  664. # directories.
  665. # Format: AddDescription "description" filename
  666. #
  667. #AddDescription "GZIP compressed document" .gz
  668. #AddDescription "tar archive" .tar
  669. #AddDescription "GZIP compressed tar archive" .tgz
  670.  
  671. #
  672. # ReadmeName is the name of the README file the server will look for by
  673. # default, and append to directory listings.
  674. #
  675. # HeaderName is the name of a file which should be prepended to
  676. # directory indexes.
  677. ReadmeName README.html
  678. HeaderName HEADER.html
  679.  
  680. #
  681. # IndexIgnore is a set of filenames which directory indexing should ignore
  682. # and not include in the listing. Shell-style wildcarding is permitted.
  683. #
  684. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  685.  
  686. #
  687. # DefaultLanguage and AddLanguage allows you to specify the language of
  688. # a document. You can then use content negotiation to give a browser a
  689. # file in a language the user can understand.
  690. #
  691. # Specify a default language. This means that all data
  692. # going out without a specific language tag (see below) will
  693. # be marked with this one. You probably do NOT want to set
  694. # this unless you are sure it is correct for all cases.
  695. #
  696. # * It is generally better to not mark a page as
  697. # * being a certain language than marking it with the wrong
  698. # * language!
  699. #
  700. # DefaultLanguage nl
  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 some cases
  708. # the two character 'Language' abbreviation is not identical to
  709. # the two character 'Country' code for its country,
  710. # E.g. 'Danmark/dk' versus 'Danish/da'.
  711. #
  712. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  713. # specifier. There is 'work in progress' to fix this and get
  714. # the reference data for rfc1766 cleaned up.
  715. #
  716. # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
  717. # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
  718. # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
  719. # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
  720. # Norwegian (no) - Polish (pl) - Portugese (pt)
  721. # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
  722. # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
  723. #
  724. AddLanguage ca .ca
  725. AddLanguage cs .cz .cs
  726. AddLanguage da .dk
  727. AddLanguage de .de
  728. AddLanguage el .el
  729. AddLanguage en .en
  730. AddLanguage eo .eo
  731. AddLanguage es .es
  732. AddLanguage et .et
  733. AddLanguage fr .fr
  734. AddLanguage he .he
  735. AddLanguage hr .hr
  736. AddLanguage it .it
  737. AddLanguage ja .ja
  738. AddLanguage ko .ko
  739. AddLanguage ltz .ltz
  740. AddLanguage nl .nl
  741. AddLanguage nn .nn
  742. AddLanguage no .no
  743. AddLanguage pl .po
  744. AddLanguage pt .pt
  745. AddLanguage pt-BR .pt-br
  746. AddLanguage ru .ru
  747. AddLanguage sv .sv
  748. AddLanguage zh-CN .zh-cn
  749. AddLanguage zh-TW .zh-tw
  750.  
  751. #
  752. # LanguagePriority allows you to give precedence to some languages
  753. # in case of a tie during content negotiation.
  754. #
  755. # Just list the languages in decreasing order of preference. We have
  756. # more or less alphabetized them here. You probably want to change this.
  757. #
  758. LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
  759.  
  760. #
  761. # ForceLanguagePriority allows you to serve a result page rather than
  762. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
  763. # [in case no accepted languages matched the available variants]
  764. #
  765. ForceLanguagePriority Prefer Fallback
  766.  
  767. #
  768. # Specify a default charset for all content served; this enables
  769. # interpretation of all content as UTF-8 by default. To use the
  770. # default browser choice (ISO-8859-1), or to allow the META tags
  771. # in HTML content to override this choice, comment out this
  772. # directive:
  773. #
  774. AddDefaultCharset UTF-8
  775.  
  776. #
  777. # AddType allows you to add to or override the MIME configuration
  778. # file mime.types for specific file types.
  779. #
  780. #AddType application/x-tar .tgz
  781.  
  782. #
  783. # AddEncoding allows you to have certain browsers uncompress
  784. # information on the fly. Note: Not all browsers support this.
  785. # Despite the name similarity, the following Add* directives have nothing
  786. # to do with the FancyIndexing customization directives above.
  787. #
  788. #AddEncoding x-compress .Z
  789. #AddEncoding x-gzip .gz .tgz
  790.  
  791. # If the AddEncoding directives above are commented-out, then you
  792. # probably should define those extensions to indicate media types:
  793. #
  794. AddType application/x-compress .Z
  795. AddType application/x-gzip .gz .tgz
  796.  
  797. #
  798. # MIME-types for downloading Certificates and CRLs
  799. #
  800. AddType application/x-x509-ca-cert .crt
  801. AddType application/x-pkcs7-crl .crl
  802.  
  803. #
  804. # AddHandler allows you to map certain file extensions to "handlers":
  805. # actions unrelated to filetype. These can be either built into the server
  806. # or added with the Action directive (see below)
  807. #
  808. # To use CGI scripts outside of ScriptAliased directories:
  809. # (You will also need to add "ExecCGI" to the "Options" directive.)
  810. #
  811. #AddHandler cgi-script .cgi
  812.  
  813. #
  814. # For files that include their own HTTP headers:
  815. #
  816. #AddHandler send-as-is asis
  817.  
  818. #
  819. # For type maps (negotiated resources):
  820. # (This is enabled by default to allow the Apache "It Worked" page
  821. # to be distributed in multiple languages.)
  822. #
  823. AddHandler type-map var
  824.  
  825. #
  826. # Filters allow you to process content before it is sent to the client.
  827. #
  828. # To parse .shtml files for server-side includes (SSI):
  829. # (You will also need to add "Includes" to the "Options" directive.)
  830. #
  831. AddType text/html .shtml
  832. AddOutputFilter INCLUDES .shtml
  833.  
  834. #
  835. # Action lets you define media types that will execute a script whenever
  836. # a matching file is called. This eliminates the need for repeated URL
  837. # pathnames for oft-used CGI file processors.
  838. # Format: Action media/type /cgi-script/location
  839. # Format: Action handler-name /cgi-script/location
  840. #
  841.  
  842. #
  843. # Customizable error responses come in three flavors:
  844. # 1) plain text 2) local redirects 3) external redirects
  845. #
  846. # Some examples:
  847. #ErrorDocument 500 "The server made a boo boo."
  848. #ErrorDocument 404 /missing.html
  849. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  850. #ErrorDocument 402 http://www.example.com/subscription_info.html
  851. #
  852.  
  853. #
  854. # Putting this all together, we can internationalize error responses.
  855. #
  856. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  857. # our collection of by-error message multi-language collections. We use
  858. # includes to substitute the appropriate text.
  859. #
  860. # You can modify the messages' appearance without changing any of the
  861. # default HTTP_<error>.html.var files by adding the line:
  862. #
  863. # Alias /error/include/ "/your/include/path/"
  864. #
  865. # which allows you to create your own set of files by starting with the
  866. # /var/www/error/include/ files and
  867. # copying them to /your/include/path/, even on a per-VirtualHost basis.
  868. #
  869.  
  870. Alias /error/ "/var/www/error/"
  871. # ErrorDocument 400 /error/error.php?code=400
  872. # ErrorDocument 401 /error/error.php?code=401
  873. # ErrorDocument 403 /error/error.php?code=403
  874.  
  875. <IfModule mod_negotiation.c>
  876. <IfModule mod_include.c>
  877. <Directory "/var/www/error">
  878. AllowOverride None
  879. Options IncludesNoExec
  880. AddOutputFilter Includes html
  881. AddHandler type-map var
  882. Order allow,deny
  883. Allow from all
  884. LanguagePriority en es de fr
  885. ForceLanguagePriority Prefer Fallback
  886. </Directory>
  887.  
  888. # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  889. # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  890. # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  891. # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  892. # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  893. # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  894. # ErrorDocument 410 /error/HTTP_GONE.html.var
  895. # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  896. # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  897. # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  898. # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  899. # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  900. # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  901. # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  902. # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  903. # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  904. # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  905.  
  906. </IfModule>
  907. </IfModule>
  908.  
  909. #
  910. # The following directives modify normal HTTP response behavior to
  911. # handle known problems with browser implementations.
  912. #
  913. BrowserMatch "Mozilla/2" nokeepalive
  914. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  915. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  916. BrowserMatch "Java/1\.0" force-response-1.0
  917. BrowserMatch "JDK/1\.0" force-response-1.0
  918.  
  919. #
  920. # The following directive disables redirects on non-GET requests for
  921. # a directory that does not include the trailing slash. This fixes a
  922. # problem with Microsoft WebFolders which does not appropriately handle
  923. # redirects for folders with DAV methods.
  924. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
  925. #
  926. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  927. BrowserMatch "MS FrontPage" redirect-carefully
  928. BrowserMatch "^WebDrive" redirect-carefully
  929. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
  930. BrowserMatch "^gnome-vfs/1.0" redirect-carefully
  931. BrowserMatch "^XML Spy" redirect-carefully
  932. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
  933.  
  934. #
  935. # Allow server status reports generated by mod_status,
  936. # with the URL of http://servername/server-status
  937. # Change the ".example.com" to match your domain to enable.
  938. #
  939. #<Location /server-status>
  940. # SetHandler server-status
  941. # Order deny,allow
  942. # Deny from all
  943. # Allow from .example.com
  944. #</Location>
  945.  
  946. #
  947. # Allow remote server configuration reports, with the URL of
  948. # http://servername/server-info (requires that mod_info.c be loaded).
  949. # Change the ".example.com" to match your domain to enable.
  950. #
  951. #<Location /server-info>
  952. # SetHandler server-info
  953. # Order deny,allow
  954. # Deny from all
  955. # Allow from .example.com
  956. #</Location>
  957.  
  958. #
  959. # Proxy Server directives. Uncomment the following lines to
  960. # enable the proxy server:
  961. #
  962. #<IfModule mod_proxy.c>
  963. #ProxyRequests On
  964. #
  965. #<Proxy *>
  966. # Order deny,allow
  967. # Deny from all
  968. # Allow from .example.com
  969. #</Proxy>
  970.  
  971. #
  972. # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  973. # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  974. # Set to one of: Off | On | Full | Block
  975. #
  976. #ProxyVia On
  977.  
  978. #
  979. # To enable a cache of proxied content, uncomment the following lines.
  980. # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
  981. #
  982. #<IfModule mod_disk_cache.c>
  983. # CacheEnable disk /
  984. # CacheRoot "/var/cache/mod_proxy"
  985. #</IfModule>
  986. #
  987.  
  988. #</IfModule>
  989. # End of proxy directives.
  990.  
  991. ### Section 3: Virtual Hosts
  992. #
  993. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  994. # machine you can setup VirtualHost containers for them. Most configurations
  995. # use only name-based virtual hosts so the server doesn't need to worry about
  996. # IP addresses. This is indicated by the asterisks in the directives below.
  997. #
  998. # Please see the documentation at
  999. # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
  1000. # for further details before you try to setup virtual hosts.
  1001. #
  1002. # You may use the command line option '-S' to verify your virtual host
  1003. # configuration.
  1004.  
  1005. #
  1006. # Use name-based virtual hosting.
  1007. #
  1008. #NameVirtualHost *:80
  1009. #
  1010. # NOTE: NameVirtualHost cannot be used without a port specifier
  1011. # (e.g. :80) if mod_ssl is being used, due to the nature of the
  1012. # SSL protocol.
  1013. #
  1014.  
  1015. #
  1016. # VirtualHost example:
  1017. # Almost any Apache directive may go into a VirtualHost container.
  1018. # The first VirtualHost section is used for requests without a known
  1019. # server name.
  1020. #
  1021. #<VirtualHost *:80>
  1022. # ServerAdmin [email protected]
  1023. # DocumentRoot /www/docs/dummy-host.example.com
  1024. # ServerName dummy-host.example.com
  1025. # ErrorLog logs/dummy-host.example.com-error_log
  1026. # CustomLog logs/dummy-host.example.com-access_log common
  1027. #</VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment