Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1639282
  • 博文数量: 409
  • 博客积分: 6240
  • 博客等级: 准将
  • 技术积分: 4908
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-01 00:04
文章分类

全部博文(409)

文章存档

2021年(1)

2019年(1)

2017年(1)

2016年(13)

2015年(22)

2013年(4)

2012年(240)

2011年(127)

分类: LINUX

2012-02-14 20:08:20


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






阅读(1426) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~