Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

求救:用Apache以后论坛打开速度时快时慢,求解

[复制链接]
sachem 发表于 2007-4-27 22:02:13 | 显示全部楼层 |阅读模式

  1. # This is the main Apache HTTP server configuration file.  It contains the
  2. # configuration directives that give the server its instructions.
  3. # See <URL:[url]http://httpd.apache.org/docs/2.2/[/url]> for detailed information.
  4. # In particular, see
  5. # <URL:[url]http://httpd.apache.org/docs/2.2/mod/directives.html[/url]>
  6. # for a discussion of each configuration directive.
  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. # Configuration and logfile names: If the filenames you specify for many
  13. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  14. # server will use that explicit path.  If the filenames do *not* begin
  15. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  16. # with ServerRoot set to "F:/APMServ5.2.0/Apache" will be interpreted by the
  17. # server as "F:/APMServ5.2.0/Apache/logs/foo.log".
  18. #
  19. # NOTE: Where filenames are specified, you must use forward slashes
  20. # instead of backslashes (e.g., "F:/APMServ5.2.0/Apache" instead of "c:\apache").
  21. # If a drive letter is omitted, the drive on which Apache.exe is located
  22. # will be used by default.  It is recommended that you always supply
  23. # an explicit drive letter in absolute paths, however, to avoid
  24. # confusion.
  25. #

  26. # ThreadsPerChild: constant number of worker threads in the server process
  27. # MaxRequestsPerChild: maximum  number of requests a server process serves
  28. ThreadsPerChild 5000
  29. MaxRequestsPerChild  50000

  30. #
  31. # ServerRoot: The top of the directory tree under which the server's
  32. # configuration, error, and log files are kept.
  33. #
  34. # Do not add a slash at the end of the directory path.  If you point
  35. # ServerRoot at a non-local disk, be sure to point the LockFile directive
  36. # at a local disk.  If you wish to share the same ServerRoot for multiple
  37. # httpd daemons, you will need to change at least LockFile and PidFile.
  38. #
  39. ServerRoot "F:/APMServ5.2.0/Apache"

  40. #
  41. # Listen: Allows you to bind Apache to specific IP addresses and/or
  42. # ports, instead of the default. See also the <VirtualHost>
  43. # directive.
  44. #
  45. # Change this to Listen on specific IP addresses as shown below to
  46. # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
  47. #
  48. #Listen 12.34.56.78:80
  49. Listen 80

  50. #
  51. # Dynamic Shared Object (DSO) Support
  52. #
  53. # To be able to use the functionality of a module which was built as a DSO you
  54. # have to place corresponding `LoadModule' lines at this location so the
  55. # directives contained in it are actually available _before_ they are used.
  56. # Statically compiled modules (those listed by `httpd -l') do not need
  57. # to be loaded here.
  58. #
  59. # Example:
  60. # LoadModule foo_module modules/mod_foo.so
  61. #
  62. LoadModule actions_module modules/mod_actions.so
  63. LoadModule alias_module modules/mod_alias.so
  64. LoadModule asis_module modules/mod_asis.so
  65. LoadModule auth_basic_module modules/mod_auth_basic.so
  66. #LoadModule auth_digest_module modules/mod_auth_digest.so
  67. #LoadModule authn_anon_module modules/mod_authn_anon.so
  68. #LoadModule authn_dbm_module modules/mod_authn_dbm.so
  69. LoadModule authn_default_module modules/mod_authn_default.so
  70. LoadModule authn_file_module modules/mod_authn_file.so
  71. #LoadModule authz_dbm_module modules/mod_authz_dbm.so
  72. LoadModule authz_default_module modules/mod_authz_default.so
  73. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  74. LoadModule authz_host_module modules/mod_authz_host.so
  75. LoadModule authz_user_module modules/mod_authz_user.so
  76. LoadModule autoindex_module modules/mod_autoindex.so
  77. #LoadModule cern_meta_module modules/mod_cern_meta.so
  78. LoadModule cgi_module modules/mod_cgi.so
  79. #LoadModule dav_module modules/mod_dav.so
  80. #LoadModule dav_fs_module modules/mod_dav_fs.so
  81. #LoadModule deflate_module modules/mod_deflate.so
  82. LoadModule dir_module modules/mod_dir.so
  83. LoadModule env_module modules/mod_env.so
  84. #LoadModule expires_module modules/mod_expires.so
  85. #LoadModule file_cache_module modules/mod_file_cache.so
  86. #LoadModule headers_module modules/mod_headers.so
  87. LoadModule imagemap_module modules/mod_imagemap.so
  88. LoadModule include_module modules/mod_include.so
  89. #LoadModule info_module modules/mod_info.so
  90. LoadModule isapi_module modules/mod_isapi.so
  91. LoadModule log_config_module modules/mod_log_config.so
  92. LoadModule mime_module modules/mod_mime.so
  93. #LoadModule mime_magic_module modules/mod_mime_magic.so
  94. LoadModule proxy_module modules/mod_proxy.so
  95. #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
  96. #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  97. #LoadModule proxy_connect_module modules/mod_proxy_connect.so
  98. LoadModule proxy_http_module modules/mod_proxy_http.so
  99. #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  100. LoadModule negotiation_module modules/mod_negotiation.so
  101. LoadModule rewrite_module modules/mod_rewrite.so
  102. LoadModule setenvif_module modules/mod_setenvif.so
  103. #LoadModule speling_module modules/mod_speling.so
  104. #LoadModule status_module modules/mod_status.so
  105. #LoadModule unique_id_module modules/mod_unique_id.so
  106. LoadModule userdir_module modules/mod_userdir.so
  107. #LoadModule usertrack_module modules/mod_usertrack.so
  108. LoadModule vhost_alias_module modules/mod_vhost_alias.so
  109. LoadModule ssl_module modules/mod_ssl.so
  110. LoadFile "F:/APMServ5.2.0/PHP/libmysql.dll"
  111. LoadModule php5_module "F:/APMServ5.2.0/PHP/php5apache2_2.dll"
  112. PHPIniDir "F:/APMServ5.2.0/PHP/php.ini"

  113. # 'Main' server configuration
  114. #
  115. # The directives in this section set up the values used by the 'main'
  116. # server, which responds to any requests that aren't handled by a
  117. # <VirtualHost> definition.  These values also provide defaults for
  118. # any <VirtualHost> containers you may define later in the file.
  119. #
  120. # All of these directives may appear inside <VirtualHost> containers,
  121. # in which case these default settings will be overridden for the
  122. # virtual host being defined.
  123. #

  124. #
  125. # ServerAdmin: Your address, where problems with the server should be
  126. # e-mailed.  This address appears on some server-generated pages, such
  127. # as error documents.  e.g. [email]admin@your-domain.com[/email]
  128. #
  129. ServerAdmin webmaster@localhost

  130. #
  131. # ServerName gives the name and port that the server uses to identify itself.
  132. # This can often be determined automatically, but we recommend you specify
  133. # it explicitly to prevent problems during startup.
  134. #
  135. # If your host doesn't have a registered DNS name, enter its IP address here.
  136. #
  137. ServerName 192.168.0.51:80

  138. #
  139. # DocumentRoot: The directory out of which you will serve your
  140. # documents. By default, all requests are taken from this directory, but
  141. # symbolic links and aliases may be used to point to other locations.
  142. #
  143. DocumentRoot "F:/APMServ5.2.0/www/htdocs"

  144. #
  145. # Each directory to which Apache has access can be configured with respect
  146. # to which services and features are allowed and/or disabled in that
  147. # directory (and its subdirectories).
  148. #
  149. # First, we configure the "default" to be a very restrictive set of
  150. # features.  
  151. #
  152. <Directory />
  153.     Options FollowSymLinks
  154.     AllowOverride None
  155.     Order deny,allow
  156.     Deny from all
  157.     Satisfy all
  158. </Directory>

  159. #
  160. # Note that from this point forward you must specifically allow
  161. # particular features to be enabled - so if something's not working as
  162. # you might expect, make sure that you have specifically enabled it
  163. # below.
  164. #

  165. #
  166. # This should be changed to whatever you set DocumentRoot to.
  167. #
  168. <Directory "F:/APMServ5.2.0/www/htdocs">
  169.     #
  170.     # Possible values for the Options directive are "None", "All",
  171.     # or any combination of:
  172.     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  173.     #
  174.     # Note that "MultiViews" must be named *explicitly* --- "Options All"
  175.     # doesn't give it to you.
  176.     #
  177.     # The Options directive is both complicated and important.  Please see
  178.     # [url]http://httpd.apache.org/docs/2.2/mod/core.html#options[/url]
  179.     # for more information.
  180.     #
  181.     Options Indexes FollowSymLinks Includes ExecCGI

  182.     #
  183.     # AllowOverride controls what directives may be placed in .htaccess files.
  184.     # It can be "All", "None", or any combination of the keywords:
  185.     #   Options FileInfo AuthConfig Limit
  186.     #
  187.     AllowOverride None

  188.     #
  189.     # Controls who can get stuff from this server.
  190.     #
  191.     Order allow,deny
  192.     Allow from all

  193. </Directory>

  194. #
  195. # DirectoryIndex: sets the file that Apache will serve if a directory
  196. # is requested.
  197. #
  198. <IfModule dir_module>
  199.     DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml default.shtml
  200. </IfModule>

  201. #
  202. # The following lines prevent .htaccess and .htpasswd files from being
  203. # viewed by Web clients.
  204. #
  205. <FilesMatch "^\.ht">
  206.     Order allow,deny
  207.     Deny from all
  208. </FilesMatch>

  209. #
  210. # ErrorLog: The location of the error log file.
  211. # If you do not specify an ErrorLog directive within a <VirtualHost>
  212. # container, error messages relating to that virtual host will be
  213. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  214. # container, that host's errors will be logged there and not here.
  215. #
  216. ErrorLog logs/error.log

  217. #
  218. # LogLevel: Control the number of messages logged to the error_log.
  219. # Possible values include: debug, info, notice, warn, error, crit,
  220. # alert, emerg.
  221. #
  222. LogLevel warn

  223. <IfModule log_config_module>
  224.     #
  225.     # The following directives define some format nicknames for use with
  226.     # a CustomLog directive (see below).
  227.     #
  228.     LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
  229.     LogFormat "%h %l %u %t "%r" %>s %b" common

  230.     <IfModule logio_module>
  231.       # You need to enable mod_logio.c to use %I and %O
  232.       LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
  233.     </IfModule>

  234.     #
  235.     # The location and format of the access logfile (Common Logfile Format).
  236.     # If you do not define any access logfiles within a <VirtualHost>
  237.     # container, they will be logged here.  Contrariwise, if you *do*
  238.     # define per-<VirtualHost> access logfiles, transactions will be
  239.     # logged therein and *not* in this file.
  240.     #
  241.     #CustomLog logs/access.log common

  242.     #
  243.     # If you prefer a logfile with access, agent, and referer information
  244.     # (Combined Logfile Format) you can use the following directive.
  245.     #
  246.     #CustomLog logs/access.log combined
  247. </IfModule>

  248. <IfModule alias_module>
  249.     #
  250.     # Redirect: Allows you to tell clients about documents that used to
  251.     # exist in your server's namespace, but do not anymore. The client
  252.     # will make a new request for the document at its new location.
  253.     # Example:
  254.     # Redirect permanent /foo [url]http://www.example.com/bar[/url]

  255.     #
  256.     # Alias: Maps web paths into filesystem paths and is used to
  257.     # access content that does not live under the DocumentRoot.
  258.     # Example:
  259.     # Alias /webpath /full/filesystem/path
  260.     #
  261.     # If you include a trailing / on /webpath then the server will
  262.     # require it to be present in the URL.  You will also likely
  263.     # need to provide a <Directory> section to allow access to
  264.     # the filesystem path.

  265.     #
  266.     # ScriptAlias: This controls which directories contain server scripts.
  267.     # ScriptAliases are essentially the same as Aliases, except that
  268.     # documents in the target directory are treated as applications and
  269.     # run by the server when requested rather than as documents sent to the
  270.     # client.  The same rules about trailing "/" apply to ScriptAlias
  271.     # directives as to Alias.
  272.     #
  273.     ScriptAlias /cgi-bin/ "F:/APMServ5.2.0/www/cgi-bin/"

  274. </IfModule>

  275. #
  276. # "F:/APMServ5.2.0/Apache/cgi-bin" should be changed to whatever your ScriptAliased
  277. # CGI directory exists, if you have that configured.
  278. #
  279. <Directory "F:/APMServ5.2.0/www/cgi-bin">
  280.     AllowOverride None
  281.     Options None
  282.     Order allow,deny
  283.     Allow from all
  284. </Directory>

  285. #
  286. # Apache parses all CGI scripts for the shebang line by default.
  287. # This comment line, the first line of the script, consists of the symbols
  288. # pound (#) and exclamation (!) followed by the path of the program that
  289. # can execute this specific script.  For a perl script, with perl.exe in
  290. # the C:\Program Files\Perl directory, the shebang line should be:

  291.    #!c:/program files/perl/perl

  292. # Note you _must_not_ indent the actual shebang line, and it must be the
  293. # first line of the file.  Of course, CGI processing must be enabled by
  294. # the appropriate ScriptAlias or Options ExecCGI directives for the files
  295. # or directory in question.
  296. #
  297. # However, Apache on Windows allows either the Unix behavior above, or can
  298. # use the Registry to match files by extention.  The command to execute
  299. # a file of this type is retrieved from the registry by the same method as
  300. # the Windows Explorer would use to handle double-clicking on a file.
  301. # These script actions can be configured from the Windows Explorer View menu,
  302. # 'Folder Options', and reviewing the 'File Types' tab.  Clicking the Edit
  303. # button allows you to modify the Actions, of which Apache 1.3 attempts to
  304. # perform the 'Open' Action, and failing that it will try the shebang line.
  305. # This behavior is subject to change in Apache release 2.0.
  306. #
  307. # Each mechanism has it's own specific security weaknesses, from the means
  308. # to run a program you didn't intend the website owner to invoke, and the
  309. # best method is a matter of great debate.
  310. #
  311. # To enable the this Windows specific behavior (and therefore -disable- the
  312. # equivilant Unix behavior), uncomment the following directive:
  313. #
  314. #ScriptInterpreterSource registry
  315. #
  316. # The directive above can be placed in individual <Directory> blocks or the
  317. # .htaccess file, with either the 'registry' (Windows behavior) or 'script'
  318. # (Unix behavior) option, and will override this server default option.
  319. #

  320. #
  321. # DefaultType: the default MIME type the server will use for a document
  322. # if it cannot otherwise determine one, such as from filename extensions.
  323. # If your server contains mostly text or HTML documents, "text/plain" is
  324. # a good value.  If most of your content is binary, such as applications
  325. # or images, you may want to use "application/octet-stream" instead to
  326. # keep browsers from trying to display binary files as though they are
  327. # text.
  328. #
  329. DefaultType text/plain

  330. <IfModule mime_module>
  331.     #
  332.     # TypesConfig points to the file containing the list of mappings from
  333.     # filename extension to MIME-type.
  334.     #
  335.     TypesConfig conf/mime.types

  336.     #
  337.     # AddType allows you to add to or override the MIME configuration
  338.     # file specified in TypesConfig for specific file types.
  339.     #
  340.     #AddType application/x-gzip .tgz
  341.     #
  342.     # AddEncoding allows you to have certain browsers uncompress
  343.     # information on the fly. Note: Not all browsers support this.
  344.     #
  345.     #AddEncoding x-compress .Z
  346.     #AddEncoding x-gzip .gz .tgz
  347.     #
  348.     # If the AddEncoding directives above are commented-out, then you
  349.     # probably should define those extensions to indicate media types:
  350.     #
  351.     AddType application/x-compress .Z
  352.     AddType application/x-gzip .gz .tgz
  353.     AddType application/x-httpd-php .php

  354.     #
  355.     # AddHandler allows you to map certain file extensions to "handlers":
  356.     # actions unrelated to filetype. These can be either built into the server
  357.     # or added with the Action directive (see below)
  358.     #
  359.     # To use CGI scripts outside of ScriptAliased directories:
  360.     # (You will also need to add "ExecCGI" to the "Options" directive.)
  361.     #
  362.     AddHandler cgi-script .cgi
  363.         AddHandler cgi-script .pl

  364.     # For type maps (negotiated resources):
  365.     #AddHandler type-map var

  366.     #
  367.     # Filters allow you to process content before it is sent to the client.
  368.     #
  369.     # To parse .shtml files for server-side includes (SSI):
  370.     # (You will also need to add "Includes" to the "Options" directive.)
  371.     #
  372.     #AddType text/html .shtml
  373.     #AddOutputFilter INCLUDES .shtml
  374. </IfModule>

  375. #
  376. # The mod_mime_magic module allows the server to use various hints from the
  377. # contents of the file itself to determine its type.  The MIMEMagicFile
  378. # directive tells the module where the hint definitions are located.
  379. #
  380. #MIMEMagicFile conf/magic

  381. #
  382. # Customizable error responses come in three flavors:
  383. # 1) plain text 2) local redirects 3) external redirects
  384. #
  385. # Some examples:
  386. #ErrorDocument 500 "The server made a boo boo."
  387. #ErrorDocument 404 /missing.html
  388. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  389. #ErrorDocument 402 [url]http://www.example.com/subscription_info.html[/url]
  390. #

  391. #
  392. # EnableMMAP and EnableSendfile: On systems that support it,
  393. # memory-mapping or the sendfile syscall is used to deliver
  394. # files.  This usually improves server performance, but must
  395. # be turned off when serving from networked-mounted
  396. # filesystems or if support for these functions is otherwise
  397. # broken on your system.
  398. #
  399. #EnableMMAP off
  400. #EnableSendfile off

  401. # Supplemental configuration
  402. #
  403. # The configuration files in the conf/extra/ directory can be
  404. # included to add extra features or to modify the default configuration of
  405. # the server, or you may simply copy their contents here and change as
  406. # necessary.

  407. # Server-pool management (MPM specific)
  408. Include conf/extra/httpd-mpm.conf

  409. # Multi-language error messages
  410. Include conf/extra/httpd-multilang-errordoc.conf

  411. # Fancy directory listings
  412. Include conf/extra/httpd-autoindex.conf

  413. # Language settings
  414. Include conf/extra/httpd-languages.conf

  415. # User home directories
  416. #Include conf/extra/httpd-userdir.conf

  417. # Real-time info on requests and configuration
  418. #Include conf/extra/httpd-info.conf

  419. # Virtual hosts
  420. Include conf/extra/httpd-vhosts.conf

  421. # Local access to the Apache HTTP Server Manual
  422. #Include conf/extra/httpd-manual.conf

  423. # Distributed authoring and versioning (WebDAV)
  424. #Include conf/extra/httpd-dav.conf

  425. # Various default settings
  426. Include conf/extra/httpd-default.conf

  427. # Secure (SSL/TLS) connections
  428. Include conf/extra/httpd-ssl.conf
  429. #Include conf/extra/httpd-vhosts-ssl.conf
  430. #
  431. # Note: The following must must be present to support
  432. #       starting without SSL on platforms with no /dev/random equivalent
  433. #       but a statically compiled-in mod_ssl.
  434. #

  435. <IfModule ssl_module>
  436. SSLRandomSeed startup builtin
  437. SSLRandomSeed connect builtin
  438. </IfModule>
  439. HostnameLookups Off

  440. #APMServ默认虚拟主机
  441. NameVirtualHost *:80
  442. <VirtualHost *:80>
  443. <IfModule mod_rewrite.c>
  444. RewriteEngine On
  445. RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index.php?$2
  446. RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
  447. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
  448. RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro.php?$2=$3
  449. RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
  450. </IfModule>

  451. ServerName www.****.com
  452. ServerAlias ****.com cnc.****.com tele.****.com
  453. DocumentRoot "F:\www\htdocs"

  454. </VirtualHost>

复制代码


打开时快时慢的晕死了1!!!!求高手帮忙了!
回复

使用道具 举报

 楼主| sachem 发表于 2007-4-28 09:19:07 | 显示全部楼层
有人帮忙吗1!!!!
回复

使用道具 举报

fuchikong 发表于 2007-9-2 22:06:44 | 显示全部楼层
我也是      
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-11-21 23:01 , Processed in 0.106024 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表