httpd.conf 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061
  1. # Based upon the NCSA server configuration files originally by Rob McCool.
  2. #
  3. # This is the main Apache server configuration file. It contains the
  4. # configuration directives that give the server its instructions.
  5. # See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
  6. # the directives.
  7. #
  8. # Do NOT simply read the instructions in here without understanding
  9. # what they do. They're here only as hints or reminders. If you are unsure
  10. # consult the online docs. You have been warned.
  11. #
  12. # The configuration directives are grouped into three basic sections:
  13. # 1. Directives that control the operation of the Apache server process as a
  14. # whole (the 'global environment').
  15. # 2. Directives that define the parameters of the 'main' or 'default' server,
  16. # which responds to requests that aren't handled by a virtual host.
  17. # These directives also provide default values for the settings
  18. # of all virtual hosts.
  19. # 3. Settings for virtual hosts, which allow Web requests to be sent to
  20. # different IP addresses or hostnames and have them handled by the
  21. # same Apache server process.
  22. #
  23. # Configuration and logfile names: If the filenames you specify for many
  24. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  25. # server will use that explicit path. If the filenames do *not* begin
  26. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  27. # with ServerRoot set to "/usr/lib/apache2" will be interpreted by the
  28. # server as "/usr/lib/apache2/logs/foo.log".
  29. #
  30. ### Section 1: Global Environment
  31. #
  32. # The directives in this section affect the overall operation of Apache,
  33. # such as the number of concurrent requests it can handle or where it
  34. # can find its configuration files.
  35. #
  36. #
  37. # ServerRoot: The top of the directory tree under which the server's
  38. # configuration, error, and log files are kept.
  39. #
  40. # NOTE! If you intend to place this on an NFS (or otherwise network)
  41. # mounted filesystem then please read the LockFile documentation (available
  42. # at <URL:http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile>);
  43. # you will save yourself a lot of trouble.
  44. #
  45. # Do NOT add a slash at the end of the directory path.
  46. #
  47. ServerRoot "/usr/lib/apache2"
  48. #
  49. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  50. #
  51. #LockFile "/var/run/apache2.lock"
  52. #
  53. # ScoreBoardFile: File used to store internal server process information.
  54. # If unspecified (the default), the scoreboard will be stored in an
  55. # anonymous shared memory segment, and will be unavailable to third-party
  56. # applications.
  57. # If specified, ensure that no two invocations of Apache share the same
  58. # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
  59. #
  60. <IfModule !perchild.c>
  61. #ScoreBoardFile /var/run/apache2_runtime_status
  62. </IfModule>
  63. #
  64. # PidFile: The file in which the server should record its process
  65. # identification number when it starts.
  66. #
  67. PidFile "/run/apache2.pid"
  68. #
  69. # Timeout: The number of seconds before receives and sends time out.
  70. #
  71. Timeout 300
  72. #
  73. # KeepAlive: Whether or not to allow persistent connections (more than
  74. # one request per connection). Set to "Off" to deactivate.
  75. #
  76. KeepAlive On
  77. #
  78. # MaxKeepAliveRequests: The maximum number of requests to allow
  79. # during a persistent connection. Set to 0 to allow an unlimited amount.
  80. # We recommend you leave this number high, for maximum performance.
  81. #
  82. MaxKeepAliveRequests 100
  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. ## Server-Pool Size Regulation (MPM specific)
  90. ##
  91. # prefork MPM [DEFAULT IF USE=-threads]
  92. # StartServers: number of server processes to start
  93. # MinSpareServers: minimum number of server processes which are kept spare
  94. # MaxSpareServers: maximum number of server processes which are kept spare
  95. # MaxClients: maximum number of server processes allowed to start
  96. # MaxRequestsPerChild: maximum number of requests a server process serves
  97. <IfModule prefork.c>
  98. StartServers 5
  99. MinSpareServers 5
  100. MaxSpareServers 10
  101. MaxClients 150
  102. MaxRequestsPerChild 0
  103. </IfModule>
  104. # worker MPM [DEFAULT IF USE=threads]
  105. # StartServers: initial number of server processes to start
  106. # MaxClients: maximum number of simultaneous client connections
  107. # MinSpareThreads: minimum number of worker threads which are kept spare
  108. # MaxSpareThreads: maximum number of worker threads which are kept spare
  109. # ThreadsPerChild: constant number of worker threads in each server process
  110. # MaxRequestsPerChild: maximum number of requests a server process serves
  111. <IfModule worker.c>
  112. StartServers 2
  113. MaxClients 150
  114. MinSpareThreads 25
  115. MaxSpareThreads 75
  116. ThreadsPerChild 25
  117. MaxRequestsPerChild 0
  118. </IfModule>
  119. # perchild MPM [THIS MPM IS NOT SUPPORTED]
  120. # NumServers: constant number of server processes
  121. # StartThreads: initial number of worker threads in each server process
  122. # MinSpareThreads: minimum number of worker threads which are kept spare
  123. # MaxSpareThreads: maximum number of worker threads which are kept spare
  124. # MaxThreadsPerChild: maximum number of worker threads in each server process
  125. # MaxRequestsPerChild: maximum number of connections per server process
  126. <IfModule perchild.c>
  127. NumServers 5
  128. StartThreads 5
  129. MinSpareThreads 5
  130. MaxSpareThreads 10
  131. MaxThreadsPerChild 20
  132. MaxRequestsPerChild 0
  133. </IfModule>
  134. # peruser MPM [THIS MPM IS NOT SUPPORTED]
  135. # MinSpareServers - Minimum number of idle children, to handle request spikes
  136. # MaxClients - Maximum number of children alive at the same time
  137. # MaxProcessors - Maximum number of processors per vhost
  138. # Multiplexer - Specify an Multiplexer Child configuration.
  139. # Processor - Specify a User and Group for a specific child process.
  140. # ServerEnvironment - Specify the server environment for this virtual host.
  141. <IfModule peruser.c>
  142. ServerLimit 256
  143. MaxClients 256
  144. MinSpareProcessors 2
  145. MaxProcessors 10
  146. MaxRequestsPerChild 1000
  147. # kill off idle processors after this many seconds
  148. # set to 0 to disable
  149. ExpireTimeout 1800
  150. Multiplexer nobody nobody
  151. Processor apache apache
  152. # chroot dir is optional:
  153. # Processor user group /path/to/chroot
  154. </IfModule>
  155. #
  156. # Listen: Allows you to bind Apache to specific IP addresses and/or
  157. # ports, instead of the default. See also the <VirtualHost>
  158. # directive.
  159. #
  160. # Change this to Listen on specific IP addresses as shown below to
  161. # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
  162. #
  163. #Listen 12.34.56.78:80
  164. Listen 80
  165. #
  166. # Dynamic Shared Object (DSO) Support
  167. #
  168. # To be able to use the functionality of a module which was built as a DSO you
  169. # have to place corresponding `LoadModule' lines at this location so the
  170. # directives contained in it are actually available _before_ they are used.
  171. # Statically compiled modules (those listed by `httpd -l') do not need
  172. # to be loaded here.
  173. #
  174. # The following modules are considered as the default configuration.
  175. # If you wish to disable one of them, you may have to alter other
  176. # configuration directives.
  177. #
  178. # You should always leave these three, as they are needed for normal use.
  179. # mod_authz_host (Order, Allow, etc..)
  180. # mod_log_config (Transferlog, etc..)
  181. # mod_mime (AddType, etc...)
  182. #
  183. # Example:
  184. # LoadModule foo_module modules/mod_foo.so
  185. # Authentication Modules
  186. #
  187. # These modules provide authentication and authorization for
  188. # clients. They should not normally be disabled.
  189. #
  190. LoadModule authz_host_module modules/mod_authz_host.so
  191. LoadModule auth_basic_module modules/mod_auth_basic.so
  192. LoadModule authn_dbm_module modules/mod_authn_dbm.so
  193. LoadModule authn_file_module modules/mod_authn_file.so
  194. LoadModule auth_digest_module modules/mod_auth_digest.so
  195. #
  196. # Metadata Modules
  197. #
  198. # These modules provide extra data to clients about
  199. # a file, such as the mime-type or charset.
  200. #
  201. LoadModule charset_lite_module modules/mod_charset_lite.so
  202. LoadModule env_module modules/mod_env.so
  203. LoadModule expires_module modules/mod_expires.so
  204. LoadModule headers_module modules/mod_headers.so
  205. LoadModule mime_module modules/mod_mime.so
  206. LoadModule negotiation_module modules/mod_negotiation.so
  207. LoadModule setenvif_module modules/mod_setenvif.so
  208. #
  209. # Logging Modules
  210. #
  211. # These modules provide logging services for Apache
  212. #
  213. LoadModule log_config_module modules/mod_log_config.so
  214. LoadModule logio_module modules/mod_logio.so
  215. #
  216. # CGI Modules
  217. #
  218. # These modules provide the ability to execute CGI Scripts.
  219. #
  220. LoadModule cgi_module modules/mod_cgi.so
  221. LoadModule cgid_module modules/mod_cgid.so
  222. #
  223. # This `suexec` module provides the ability to exeucte CGI scripts under
  224. # a different user than apache is run.
  225. #
  226. LoadModule suexec_module modules/mod_suexec.so
  227. #
  228. # Mappers
  229. #
  230. # These Modules provide URL mappings or translations.
  231. LoadModule alias_module modules/mod_alias.so
  232. LoadModule rewrite_module modules/mod_rewrite.so
  233. <IfDefine USERDIR>
  234. LoadModule userdir_module modules/mod_userdir.so
  235. </IfDefine>
  236. #
  237. # Handlers
  238. #
  239. # These modules create content for a client.
  240. #
  241. <IfDefine INFO>
  242. LoadModule info_module modules/mod_info.so
  243. LoadModule status_module modules/mod_status.so
  244. </IfDefine>
  245. LoadModule actions_module modules/mod_actions.so
  246. LoadModule autoindex_module modules/mod_autoindex.so
  247. LoadModule dir_module modules/mod_dir.so
  248. #
  249. # Filters
  250. #
  251. # These modules provide filters for Apache.
  252. # They preform common tasks like gzip encoding or SSI
  253. #
  254. #
  255. LoadModule ext_filter_module modules/mod_ext_filter.so
  256. LoadModule deflate_module modules/mod_deflate.so
  257. LoadModule include_module modules/mod_include.so
  258. #
  259. # Cache Modules
  260. #
  261. # The following modules are used for storing a cache of
  262. # generated or proxied content.
  263. #
  264. #LoadModule cache_module modules/mod_cache.so
  265. #LoadModule disk_cache_module modules/mod_disk_cache.so
  266. #LoadModule mem_cache_module modules/mod_mem_cache.so
  267. #LoadModule file_cache_module modules/mod_file_cache.so
  268. #
  269. # Proxy Modules
  270. #
  271. # The following modules are only needed if you are running
  272. # Apache as a Forward or Reverse Proxy.
  273. #
  274. # WARNING: Enabling these modules can be dangerous!
  275. # READ THE DOCUMENTATION FIRST:
  276. # http://httpd.apache.org/docs-2.0/mod/mod_proxy.html
  277. <IfDefine PROXY>
  278. LoadModule proxy_module modules/mod_proxy.so
  279. LoadModule proxy_connect_module modules/mod_proxy_connect.so
  280. LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  281. LoadModule proxy_http_module modules/mod_proxy_http.so
  282. </IfDefine>
  283. #
  284. # Uncommon Modules
  285. #
  286. # The following Modules are not commonly loaded for Apache
  287. #
  288. #LoadModule case_filter_module modules/mod_case_filter.so
  289. #LoadModule case_filter_in_module modules/mod_case_filter_in.so
  290. #LoadModule echo_module modules/mod_echo.so
  291. #LoadModule mime_magic_module modules/mod_mime_magic.so
  292. #LoadModule speling_module modules/mod_speling.so
  293. #LoadModule unique_id_module modules/mod_unique_id.so
  294. #LoadModule vhost_alias_module modules/mod_vhost_alias.so
  295. #
  296. # Obsolete Modules
  297. #
  298. # The Following modules are not commonly needed and use
  299. # obsolete technologies.
  300. #
  301. #LoadModule cern_meta_module modules/mod_cern_meta.so
  302. #LoadModule imap_module modules/mod_imap.so
  303. #LoadModule usertrack_module modules/mod_usertrack.so
  304. #LoadModule asis_module modules/mod_asis.so
  305. # Extra configuration
  306. #
  307. IncludeOptional /etc/apache2/conf.d/*.conf
  308. #
  309. # Extra Modules
  310. #
  311. # We Include extra .conf files from /etc/apache2/modules.d
  312. # This is used to load things like PHP and mod_ssl.
  313. #
  314. Include /etc/apache2/modules.d/*.conf
  315. ### Section 2: 'Main' server configuration
  316. #
  317. # The directives in this section set up the values used by the 'main'
  318. # server, which responds to any requests that aren't handled by a
  319. # <VirtualHost> definition. These values also provide defaults for
  320. # any <VirtualHost> containers you may define later in the file.
  321. #
  322. # All of these directives may appear inside <VirtualHost> containers,
  323. # in which case these default settings will be overridden for the
  324. # virtual host being defined.
  325. #
  326. #
  327. # If you wish httpd to run as a different user or group, you must run
  328. # httpd as root initially and it will switch.
  329. #
  330. # User/Group: The name (or #number) of the user/group to run httpd as.
  331. # . On SCO (ODT 3) use "User nouser" and "Group nogroup".
  332. # . On HPUX you may not be able to use shared memory as nobody, and the
  333. # suggested workaround is to create a user www and use that user.
  334. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
  335. # when the value of (unsigned)Group is above 60000;
  336. # don't use Group #-1 on these systems!
  337. #
  338. LoadModule unixd_module modules/mod_unixd.so
  339. User apache
  340. Group apache
  341. #
  342. # ServerAdmin: Your address, where problems with the server should be
  343. # e-mailed. This address appears on some server-generated pages, such
  344. # as error documents. e.g. admin@your-domain.com
  345. #
  346. ServerAdmin root@localhost
  347. #
  348. # ServerName gives the name and port that the server uses to identify itself.
  349. # This can often be determined automatically, but we recommend you specify
  350. # it explicitly to prevent problems during startup.
  351. #
  352. # If this is not set to valid DNS name for your host, server-generated
  353. # redirections will not work. See also the UseCanonicalName directive.
  354. #
  355. # If your host doesn't have a registered DNS name, enter its IP address here.
  356. # You will have to access it by its address anyway, and this will make
  357. # redirections work in a sensible way.
  358. #
  359. ServerName localhost
  360. #
  361. # UseCanonicalName: Determines how Apache constructs self-referencing
  362. # URLs and the SERVER_NAME and SERVER_PORT variables.
  363. # When set "Off", Apache will use the Hostname and Port supplied
  364. # by the client. When set "On", Apache will use the value of the
  365. # ServerName directive.
  366. #
  367. UseCanonicalName Off
  368. #
  369. # Each directory to which Apache has access can be configured with respect
  370. # to which services and features are allowed and/or disabled in that
  371. # directory (and its subdirectories).
  372. #
  373. # First, we configure the "default" to be a very restrictive set of
  374. # features.
  375. #
  376. <Directory />
  377. Options FollowSymLinks
  378. AllowOverride None
  379. </Directory>
  380. #
  381. # Note that from this point forward you must specifically allow
  382. # particular features to be enabled - so if something's not working as
  383. # you might expect, make sure that you have specifically enabled it
  384. # below.
  385. #
  386. #
  387. # UserDir: The name of the directory that is appended onto a user's home
  388. # directory if a ~user request is received.
  389. # enable by adding -D USERDIR to /etc/conf.d/apache2
  390. #
  391. LoadModule authz_core_module modules/mod_authz_core.so
  392. LoadModule authz_host_module modules/mod_authz_host.so
  393. LoadModule access_compat_module modules/mod_access_compat.so
  394. <IfModule mod_userdir.c>
  395. UserDir public_html
  396. #
  397. # Control access to UserDir directories. The following is an example
  398. # for a site where these directories are restricted to read-only.
  399. #
  400. <Directory /home/*/public_html>
  401. AllowOverride FileInfo AuthConfig Limit Indexes
  402. Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  403. <Limit GET POST OPTIONS>
  404. Order allow,deny
  405. Allow from all
  406. </Limit>
  407. <LimitExcept GET POST OPTIONS>
  408. Order deny,allow
  409. Deny from all
  410. </LimitExcept>
  411. </Directory>
  412. # Enable this additional section if you would like to make use of a
  413. # suexec-enabled cgi-bin directory on a per-user basis.
  414. #
  415. #<Directory /home/*/public_html/cgi-bin>
  416. # Options ExecCGI
  417. # SetHandler cgi-script
  418. #</Directory>
  419. </IfModule>
  420. #
  421. # DirectoryIndex: sets the file that Apache will serve if a directory
  422. # is requested.
  423. #
  424. # The index.html.var file (a type-map) is used to deliver content-
  425. # negotiated documents. The MultiViews Option can be used for the
  426. # same purpose, but it is much slower.
  427. #
  428. DirectoryIndex index.html
  429. #
  430. # AccessFileName: The name of the file to look for in each directory
  431. # for additional configuration directives. See also the AllowOverride
  432. # directive.
  433. #
  434. AccessFileName .htaccess
  435. #
  436. # The following lines prevent .htaccess and .htpasswd files from being
  437. # viewed by Web clients.
  438. #
  439. <Files ~ "^\.ht">
  440. Order allow,deny
  441. Deny from all
  442. </Files>
  443. #
  444. # TypesConfig describes where the mime.types file (or equivalent) is
  445. # to be found.
  446. #
  447. TypesConfig /etc/mime.types
  448. #
  449. # DefaultType is the default MIME type the server will use for a document
  450. # if it cannot otherwise determine one, such as from filename extensions.
  451. # If your server contains mostly text or HTML documents, "text/plain" is
  452. # a good value. If most of your content is binary, such as applications
  453. # or images, you may want to use "application/octet-stream" instead to
  454. # keep browsers from trying to display binary files as though they are
  455. # text.
  456. #
  457. DefaultType text/plain
  458. #
  459. # The mod_mime_magic module allows the server to use various hints from the
  460. # contents of the file itself to determine its type. The MIMEMagicFile
  461. # directive tells the module where the hint definitions are located.
  462. #
  463. <IfModule mod_mime_magic.c>
  464. MIMEMagicFile /etc/apache2/magic
  465. </IfModule>
  466. #
  467. # HostnameLookups: Log the names of clients or just their IP addresses
  468. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  469. # The default is off because it'd be overall better for the net if people
  470. # had to knowingly turn this feature on, since enabling it means that
  471. # each client request will result in AT LEAST one lookup request to the
  472. # nameserver.
  473. #
  474. HostnameLookups Off
  475. #
  476. # EnableMMAP: Control whether memory-mapping is used to deliver
  477. # files (assuming that the underlying OS supports it).
  478. # The default is on; turn this off if you serve from NFS-mounted
  479. # filesystems. On some systems, turning it off (regardless of
  480. # filesystem) can improve performance; for details, please see
  481. # http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap
  482. #
  483. #EnableMMAP off
  484. #
  485. # EnableSendfile: Control whether the sendfile kernel support is
  486. # used to deliver files (assuming that the OS supports it).
  487. # The default is on; turn this off if you serve from NFS-mounted
  488. # filesystems. Please see
  489. # http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile
  490. #
  491. #EnableSendfile off
  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. # LogLevel: Control the number of messages logged to the error_log.
  502. # Possible values include: debug, info, notice, warn, error, crit,
  503. # alert, emerg.
  504. #
  505. LogLevel warn
  506. #
  507. # The following directives define some format nicknames for use with
  508. # a CustomLog directive (see below).
  509. #
  510. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  511. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  512. LogFormat "%{Referer}i -> %U" referer
  513. LogFormat "%{User-agent}i" agent
  514. LogFormat "%v %h %l %u %t \"%r\" %>s %b %T" script
  515. LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" VLOG=%{VLOG}e" vhost
  516. # You need to enable mod_logio.c to use %I and %O
  517. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  518. #
  519. # The location and format of the access logfile (Common Logfile Format).
  520. # If you do not define any access logfiles within a <VirtualHost>
  521. # container, they will be logged here. Contrariwise, if you *do*
  522. # define per-<VirtualHost> access logfiles, transactions will be
  523. # logged therein and *not* in this file.
  524. #
  525. CustomLog logs/access_log common
  526. #
  527. # If you would like to have agent and referer logfiles, uncomment the
  528. # following directives.
  529. #
  530. #CustomLog logs/referer_log referer
  531. #CustomLog logs/agent_log agent
  532. #
  533. # If you prefer a single logfile with access, agent, and referer information
  534. # (Combined Logfile Format) you can use the following directive.
  535. #
  536. #CustomLog logs/access_log combined
  537. #
  538. # ServerTokens
  539. # This directive configures what you return as the Server HTTP response
  540. # Header. The default is 'Full' which sends information about the OS-Type
  541. # and compiled in modules.
  542. # Set to one of: Full | OS | Minor | Minimal | Major | Prod
  543. # where Full conveys the most information, and Prod the least.
  544. #
  545. ServerTokens Prod
  546. #
  547. # Optionally add a line containing the server version and virtual host
  548. # name to server-generated pages (internal error documents, FTP directory
  549. # listings, mod_status and mod_info output etc., but not CGI generated
  550. # documents or custom error documents).
  551. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  552. # Set to one of: On | Off | EMail
  553. #
  554. ServerSignature Off
  555. #
  556. # Aliases: Add here as many aliases as you need (with no limit). The format is
  557. # Alias fakename realname
  558. #
  559. # Note that if you include a trailing / on fakename then the server will
  560. # require it to be present in the URL. So "/icons" isn't aliased in this
  561. # example, only "/icons/". If the fakename is slash-terminated, then the
  562. # realname must also be slash terminated, and if the fakename omits the
  563. # trailing slash, the realname must also omit it.
  564. #
  565. # We include the /icons/ alias for FancyIndexed directory listings. If you
  566. # do not use FancyIndexing, you may comment this out.
  567. #
  568. Alias /icons/ "/var/www/localhost/icons/"
  569. <Directory "/var/www/localhost/icons/">
  570. Options Indexes MultiViews
  571. AllowOverride None
  572. Order allow,deny
  573. Allow from all
  574. </Directory>
  575. #
  576. # ScriptAlias: This controls which directories contain server scripts.
  577. # ScriptAliases are essentially the same as Aliases, except that
  578. # documents in the realname directory are treated as applications and
  579. # run by the server when requested rather than as documents sent to the client.
  580. # The same rules about trailing "/" apply to ScriptAlias directives as to
  581. # Alias.
  582. #
  583. ScriptAlias /cgi-bin/ /var/www/localhost/cgi-bin/
  584. <IfModule mod_cgid.c>
  585. #
  586. # Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
  587. # for setting UNIX socket for communicating with cgid.
  588. #
  589. #Scriptsock /var/run/cgisock
  590. </IfModule>
  591. #
  592. # "/var/www/localhost/cgi-bin/" should be changed to whatever your ScriptAliased
  593. # CGI directory exists, if you have that configured.
  594. #
  595. <Directory "/var/www/localhost/cgi-bin/">
  596. AllowOverride None
  597. Options None
  598. Order allow,deny
  599. Allow from all
  600. </Directory>
  601. #
  602. # Redirect allows you to tell clients about documents which used to exist in
  603. # your server's namespace, but do not anymore. This allows you to tell the
  604. # clients where to look for the relocated document.
  605. # Example:
  606. # Redirect permanent /foo http://www.example.com/bar
  607. #
  608. # Directives controlling the display of server-generated directory listings.
  609. #
  610. <IfModule mod_autoindex.c>
  611. #
  612. # IndexOptions: Controls the appearance of server-generated directory
  613. # listings.
  614. #
  615. IndexOptions FancyIndexing VersionSort NameWidth=60
  616. #
  617. # AddIcon* directives tell the server which icon to show for different
  618. # files or filename extensions. These are only displayed for
  619. # FancyIndexed directories.
  620. #
  621. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  622. AddIconByType (TXT,/icons/text.gif) text/*
  623. AddIconByType (IMG,/icons/image2.gif) image/*
  624. AddIconByType (SND,/icons/sound2.gif) audio/*
  625. AddIconByType (VID,/icons/movie.gif) video/*
  626. AddIcon /icons/binary.gif .bin .exe
  627. AddIcon /icons/binhex.gif .hqx
  628. AddIcon /icons/tar.gif .tar
  629. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  630. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  631. AddIcon /icons/a.gif .ps .ai .eps
  632. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  633. AddIcon /icons/text.gif .txt
  634. AddIcon /icons/c.gif .c
  635. AddIcon /icons/p.gif .pl .py
  636. AddIcon /icons/f.gif .for
  637. AddIcon /icons/dvi.gif .dvi
  638. AddIcon /icons/uuencoded.gif .uu
  639. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  640. AddIcon /icons/tex.gif .tex
  641. AddIcon /icons/bomb.gif core
  642. AddIcon /icons/back.gif ..
  643. AddIcon /icons/hand.right.gif README
  644. AddIcon /icons/folder.gif ^^DIRECTORY^^
  645. AddIcon /icons/blank.gif ^^BLANKICON^^
  646. #
  647. # DefaultIcon is which icon to show for files which do not have an icon
  648. # explicitly set.
  649. #
  650. DefaultIcon /icons/unknown.gif
  651. #
  652. # AddDescription allows you to place a short description after a file in
  653. # server-generated indexes. These are only displayed for FancyIndexed
  654. # directories.
  655. # Format: AddDescription "description" filename
  656. #
  657. #AddDescription "GZIP compressed document" .gz
  658. #AddDescription "tar archive" .tar
  659. #AddDescription "GZIP compressed tar archive" .tgz
  660. #
  661. # ReadmeName is the name of the README file the server will look for by
  662. # default, and append to directory listings.
  663. #
  664. # HeaderName is the name of a file which should be prepended to
  665. # directory indexes.
  666. ReadmeName README.html
  667. HeaderName HEADER.html
  668. #
  669. # IndexIgnore is 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* README* RCS CVS *,v *,t .svn
  673. </IfModule>
  674. #
  675. # DefaultLanguage and AddLanguage allows you to specify the language of
  676. # a document. You can then use content negotiation to give a browser a
  677. # file in a language the user can understand.
  678. #
  679. # Specify a default language. This means that all data
  680. # going out without a specific language tag (see below) will
  681. # be marked with this one. You probably do NOT want to set
  682. # this unless you are sure it is correct for all cases.
  683. #
  684. # * It is generally better to not mark a page as
  685. # * being a certain language than marking it with the wrong
  686. # * language!
  687. #
  688. # DefaultLanguage nl
  689. #
  690. # Note 1: The suffix does not have to be the same as the language
  691. # keyword --- those with documents in Polish (whose net-standard
  692. # language code is pl) may wish to use "AddLanguage pl .po" to
  693. # avoid the ambiguity with the common suffix for perl scripts.
  694. #
  695. # Note 2: The example entries below illustrate that in some cases
  696. # the two character 'Language' abbreviation is not identical to
  697. # the two character 'Country' code for its country,
  698. # E.g. 'Danmark/dk' versus 'Danish/da'.
  699. #
  700. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  701. # specifier. There is 'work in progress' to fix this and get
  702. # the reference data for rfc1766 cleaned up.
  703. #
  704. # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
  705. # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
  706. # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
  707. # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
  708. # Norwegian (no) - Polish (pl) - Portugese (pt)
  709. # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
  710. # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
  711. #
  712. AddLanguage ca .ca
  713. AddLanguage cs .cz .cs
  714. AddLanguage da .dk
  715. AddLanguage de .de
  716. AddLanguage el .el
  717. AddLanguage en .en
  718. AddLanguage eo .eo
  719. AddLanguage es .es
  720. AddLanguage et .et
  721. AddLanguage fr .fr
  722. AddLanguage he .he
  723. AddLanguage hr .hr
  724. AddLanguage it .it
  725. AddLanguage ja .ja
  726. AddLanguage ko .ko
  727. AddLanguage ltz .ltz
  728. AddLanguage nl .nl
  729. AddLanguage nn .nn
  730. AddLanguage no .no
  731. AddLanguage pl .po
  732. AddLanguage pt .pt
  733. AddLanguage pt-BR .pt-br
  734. AddLanguage ru .ru
  735. AddLanguage sv .sv
  736. AddLanguage zh-CN .zh-cn
  737. AddLanguage zh-TW .zh-tw
  738. #
  739. # LanguagePriority allows you to give precedence to some languages
  740. # in case of a tie during content negotiation.
  741. #
  742. # Just list the languages in decreasing order of preference. We have
  743. # more or less alphabetized them here. You probably want to change this.
  744. #
  745. 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
  746. #
  747. # ForceLanguagePriority allows you to serve a result page rather than
  748. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
  749. # [in case no accepted languages matched the available variants]
  750. #
  751. ForceLanguagePriority Prefer Fallback
  752. #
  753. # Specify a default charset for all pages sent out. This is
  754. # always a good idea and opens the door for future internationalisation
  755. # of your web site, should you ever want it. Specifying it as
  756. # a default does little harm; as the standard dictates that a page
  757. # is in iso-8859-1 (latin1) unless specified otherwise i.e. you
  758. # are merely stating the obvious. There are also some security
  759. # reasons in browsers, related to javascript and URL parsing
  760. # which encourage you to always set a default char set.
  761. #
  762. AddDefaultCharset UTF-8
  763. #
  764. # Commonly used filename extensions to character sets. You probably
  765. # want to avoid clashes with the language extensions, unless you
  766. # are good at carefully testing your setup after each change.
  767. # See http://www.iana.org/assignments/character-sets for the
  768. # official list of charset names and their respective RFCs.
  769. #
  770. AddCharset ISO-8859-1 .iso8859-1 .latin1
  771. AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
  772. AddCharset ISO-8859-3 .iso8859-3 .latin3
  773. AddCharset ISO-8859-4 .iso8859-4 .latin4
  774. AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
  775. AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
  776. AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
  777. AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
  778. AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
  779. AddCharset ISO-2022-JP .iso2022-jp .jis
  780. AddCharset ISO-2022-KR .iso2022-kr .kis
  781. AddCharset ISO-2022-CN .iso2022-cn .cis
  782. AddCharset Big5 .Big5 .big5
  783. # For russian, more than one charset is used (depends on client, mostly):
  784. AddCharset WINDOWS-1251 .cp-1251 .win-1251
  785. AddCharset CP866 .cp866
  786. AddCharset KOI8-r .koi8-r .koi8-ru
  787. AddCharset KOI8-ru .koi8-uk .ua
  788. AddCharset ISO-10646-UCS-2 .ucs2
  789. AddCharset ISO-10646-UCS-4 .ucs4
  790. AddCharset UTF-8 .utf8
  791. # The set below does not map to a specific (iso) standard
  792. # but works on a fairly wide range of browsers. Note that
  793. # capitalization actually matters (it should not, but it
  794. # does for some browsers).
  795. #
  796. # See http://www.iana.org/assignments/character-sets
  797. # for a list of sorts. But browsers support few.
  798. #
  799. AddCharset GB2312 .gb2312 .gb
  800. AddCharset utf-7 .utf7
  801. AddCharset utf-8 .utf8
  802. AddCharset big5 .big5 .b5
  803. AddCharset EUC-TW .euc-tw
  804. AddCharset EUC-JP .euc-jp
  805. AddCharset EUC-KR .euc-kr
  806. AddCharset shift_jis .sjis
  807. #
  808. # AddType allows you to add to or override the MIME configuration
  809. # file mime.types for specific file types.
  810. #
  811. #AddType application/x-tar .tgz
  812. #
  813. # AddEncoding allows you to have certain browsers uncompress
  814. # information on the fly. Note: Not all browsers support this.
  815. # Despite the name similarity, the following Add* directives have nothing
  816. # to do with the FancyIndexing customization directives above.
  817. #
  818. #AddEncoding x-compress .Z
  819. #AddEncoding x-gzip .gz .tgz
  820. #
  821. # If the AddEncoding directives above are commented-out, then you
  822. # probably should define those extensions to indicate media types:
  823. #
  824. AddType application/x-compress .Z
  825. AddType application/x-gzip .gz .tgz
  826. #
  827. # AddHandler allows you to map certain file extensions to "handlers":
  828. # actions unrelated to filetype. These can be either built into the server
  829. # or added with the Action directive (see below)
  830. #
  831. # To use CGI scripts outside of ScriptAliased directories:
  832. # (You will also need to add "ExecCGI" to the "Options" directive.)
  833. #
  834. #AddHandler cgi-script .cgi
  835. #
  836. # For files that include their own HTTP headers:
  837. #
  838. #AddHandler send-as-is asis
  839. #
  840. # For server-parsed imagemap files:
  841. #
  842. #AddHandler imap-file map
  843. #
  844. # For type maps (negotiated resources):
  845. # (This is enabled by default to allow the Apache "It Worked" page
  846. # to be distributed in multiple languages.)
  847. #
  848. AddHandler type-map var
  849. #
  850. # Filters allow you to process content before it is sent to the client.
  851. #
  852. # To parse .shtml files for server-side includes (SSI):
  853. # (You will also need to add "Includes" to the "Options" directive.)
  854. #
  855. #AddType text/html .shtml
  856. #AddOutputFilter INCLUDES .shtml
  857. #
  858. # Action lets you define media types that will execute a script whenever
  859. # a matching file is called. This eliminates the need for repeated URL
  860. # pathnames for oft-used CGI file processors.
  861. # Format: Action media/type /cgi-script/location
  862. # Format: Action handler-name /cgi-script/location
  863. #
  864. #
  865. # Customizable error responses come in three flavors:
  866. # 1) plain text 2) local redirects 3) external redirects
  867. #
  868. # Some examples:
  869. #ErrorDocument 500 "The server made a boo boo."
  870. #ErrorDocument 404 /missing.html
  871. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  872. #ErrorDocument 402 http://www.example.com/subscription_info.html
  873. #
  874. #
  875. # Putting this all together, we can internationalize error responses.
  876. #
  877. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  878. # our collection of by-error message multi-language collections. We use
  879. # includes to substitute the appropriate text.
  880. #
  881. # You can modify the messages' appearance without changing any of the
  882. # default HTTP_<error>.html.var files by adding the line:
  883. #
  884. # Alias /error/include/ "/your/include/path/"
  885. #
  886. # which allows you to create your own set of files by starting with the
  887. # /var/www/localhost/error/include files and copying them to /your/includepath/
  888. # even on a per-VirtualHost basis. The default include files will display
  889. # your Apache version number and your ServerAdmin email address regardless
  890. # of the setting of ServerSignature.
  891. #
  892. # The internationalized error documents require mod_alias, mod_include
  893. # and mod_negotiation. To activate them, uncomment the following 30 lines.
  894. # Alias /error/ "/var/www/localhost/error"
  895. #
  896. # <Directory "/var/www/localhost/error">
  897. # AllowOverride None
  898. # Options IncludesNoExec
  899. # AddOutputFilter Includes html
  900. # AddHandler type-map var
  901. # Order allow,deny
  902. # Allow from all
  903. # LanguagePriority en cs de es fr it nl sv pt-br ro
  904. # ForceLanguagePriority Prefer Fallback
  905. # </Directory>
  906. #
  907. # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  908. # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  909. # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  910. # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  911. # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  912. # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  913. # ErrorDocument 410 /error/HTTP_GONE.html.var
  914. # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  915. # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  916. # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  917. # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  918. # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  919. # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  920. # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  921. # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  922. # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  923. # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  924. #
  925. # The following directives modify normal HTTP response behavior to
  926. # handle known problems with browser implementations.
  927. #
  928. BrowserMatch "Mozilla/2" nokeepalive
  929. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  930. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  931. BrowserMatch "Java/1\.0" force-response-1.0
  932. BrowserMatch "JDK/1\.0" force-response-1.0
  933. #
  934. # The following directive disables redirects on non-GET requests for
  935. # a directory that does not include the trailing slash. This fixes a
  936. # problem with Microsoft WebFolders which does not appropriately handle
  937. # redirects for folders with DAV methods.
  938. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
  939. #
  940. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  941. BrowserMatch "^WebDrive" redirect-carefully
  942. BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
  943. BrowserMatch "^gnome-vfs" redirect-carefully
  944. # Pisi Linux VHosts
  945. #
  946. # For Pisi Linux we include External Virtual Hosts Files.
  947. # Please see /etc/apache2/vhosts.d/00_default_vhost.conf for the default virtual host.
  948. #
  949. Include /etc/apache2/vhosts.d/*.conf