免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4313 | 回复: 12
打印 上一主题 下一主题

[Web] Apache 2.2.6 连接数出现问题, [复制链接]

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-07-06 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-10-24 15:00 |只看该作者 |倒序浏览
现在调试一台服务器,

但是当连接数达到 20 的时候整个 Apache 服务器都无法连接,

无论多少个站点,

但是我 ssh 服务器都很正常,

只是 WEB 服务受到影响,

测试服务器地址:
server.itbbs.cn

服务器 IP 地址:
221.130.197.30

这样的效果一般应该会是什么原因?谁知道,谢谢,

论坛徽章:
0
2 [报告]
发表于 2007-10-24 16:09 |只看该作者
你看看你的 apache 的 httpd.conf 文件里的 MaxClients

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-07-06 06:20:00
3 [报告]
发表于 2007-10-24 23:53 |只看该作者
没有这个,但是,是所有站点的连接数,我从来没有特意限制过,不知道怎么回事,

论坛徽章:
0
4 [报告]
发表于 2007-10-25 11:31 |只看该作者
沒有哪個?

你把你 apache 的配置文件貼出來看看

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-07-06 06:20:00
5 [报告]
发表于 2007-10-25 11:53 |只看该作者
  1. #
  2. # This is the main Apache HTTP server configuration file.  It contains the
  3. # configuration directives that give the server its instructions.
  4. # See <URL:[url]http://httpd.apache.org/docs/2.2[/url]> for detailed information.
  5. # In particular, see
  6. # <URL:[url]http://httpd.apache.org/docs/2.2/mod/directives.html[/url]>
  7. # for a discussion of each configuration directive.
  8. #
  9. # Do NOT simply read the instructions in here without understanding
  10. # what they do.  They're here only as hints or reminders.  If you are unsure
  11. # consult the online docs. You have been warned.  
  12. #
  13. # Configuration and logfile names: If the filenames you specify for many
  14. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  15. # server will use that explicit path.  If the filenames do *not* begin
  16. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  17. # with ServerRoot set to "/usr/local/apache" will be interpreted by the
  18. # server as "/usr/local/apache/logs/foo.log".

  19. #
  20. # ServerRoot: The top of the directory tree under which the server's
  21. # configuration, error, and log files are kept.
  22. #
  23. # Do not add a slash at the end of the directory path.  If you point
  24. # ServerRoot at a non-local disk, be sure to point the LockFile directive
  25. # at a local disk.  If you wish to share the same ServerRoot for multiple
  26. # httpd daemons, you will need to change at least LockFile and PidFile.
  27. #
  28. ServerRoot "/usr/local/apache"

  29. #
  30. # Listen: Allows you to bind Apache to specific IP addresses and/or
  31. # ports, instead of the default. See also the <VirtualHost>
  32. # directive.
  33. #
  34. # Change this to Listen on specific IP addresses as shown below to
  35. # prevent Apache from glomming onto all bound IP addresses.
  36. #
  37. #Listen 12.34.56.78:80
  38. Listen 80

  39. #
  40. # Dynamic Shared Object (DSO) Support
  41. #
  42. # To be able to use the functionality of a module which was built as a DSO you
  43. # have to place corresponding `LoadModule' lines at this location so the
  44. # directives contained in it are actually available _before_ they are used.
  45. # Statically compiled modules (those listed by `httpd -l') do not need
  46. # to be loaded here.
  47. #
  48. # Example:
  49. # LoadModule foo_module modules/mod_foo.so
  50. LoadModule php5_module        modules/libphp5.so
  51. #

  52. <IfModule !mpm_netware_module>
  53. #
  54. # If you wish httpd to run as a different user or group, you must run
  55. # httpd as root initially and it will switch.  
  56. #
  57. # User/Group: The name (or #number) of the user/group to run httpd as.
  58. # It is usually good practice to create a dedicated user and group for
  59. # running httpd, as with most system services.
  60. #
  61. User daemon
  62. Group daemon
  63. </IfModule>

  64. # 'Main' server configuration
  65. #
  66. # The directives in this section set up the values used by the 'main'
  67. # server, which responds to any requests that aren't handled by a
  68. # <VirtualHost> definition.  These values also provide defaults for
  69. # any <VirtualHost> containers you may define later in the file.
  70. #
  71. # All of these directives may appear inside <VirtualHost> containers,
  72. # in which case these default settings will be overridden for the
  73. # virtual host being defined.
  74. #

  75. #
  76. # ServerAdmin: Your address, where problems with the server should be
  77. # e-mailed.  This address appears on some server-generated pages, such
  78. # as error documents.  e.g. [email]admin@your-domain.com[/email]
  79. #
  80. ServerAdmin [email]smartly@21cn.com[/email]

  81. #
  82. # ServerName gives the name and port that the server uses to identify itself.
  83. # This can often be determined automatically, but we recommend you specify
  84. # it explicitly to prevent problems during startup.
  85. #
  86. # If your host doesn't have a registered DNS name, enter its IP address here.
  87. #

  88. #
  89. # DocumentRoot: The directory out of which you will serve your
  90. # documents. By default, all requests are taken from this directory, but
  91. # symbolic links and aliases may be used to point to other locations.
  92. #

  93. #
  94. # Each directory to which Apache has access can be configured with respect
  95. # to which services and features are allowed and/or disabled in that
  96. # directory (and its subdirectories).
  97. #
  98. # First, we configure the "default" to be a very restrictive set of
  99. # features.  
  100. #

  101. #
  102. # Note that from this point forward you must specifically allow
  103. # particular features to be enabled - so if something's not working as
  104. # you might expect, make sure that you have specifically enabled it
  105. # below.
  106. #

  107. #
  108. # This should be changed to whatever you set DocumentRoot to.
  109. #
  110. <Directory "/www/default/htdocs">
  111.     #
  112.     # Possible values for the Options directive are "None", "All",
  113.     # or any combination of:
  114.     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  115.     #
  116.     # Note that "MultiViews" must be named *explicitly* --- "Options All"
  117.     # doesn't give it to you.
  118.     #
  119.     # The Options directive is both complicated and important.  Please see
  120.     # [url]http://httpd.apache.org/docs/2.2/mod/core.html#options[/url]
  121.     # for more information.
  122.     #
  123.     Options Indexes FollowSymLinks

  124.     #
  125.     # AllowOverride controls what directives may be placed in .htaccess files.
  126.     # It can be "All", "None", or any combination of the keywords:
  127.     #   Options FileInfo AuthConfig Limit
  128.     #
  129.     AllowOverride None

  130.     #
  131.     # Controls who can get stuff from this server.
  132.     #
  133.     Order allow,deny
  134.     Allow from all

  135. </Directory>

  136. #
  137. # DirectoryIndex: sets the file that Apache will serve if a directory
  138. # is requested.
  139. #
  140. <IfModule dir_module>
  141.     DirectoryIndex index.php index.html index.htm
  142. </IfModule>

  143. #
  144. # The following lines prevent .htaccess and .htpasswd files from being
  145. # viewed by Web clients.
  146. #
  147. <FilesMatch "^\.ht">
  148.     Order allow,deny
  149.     Deny from all
  150.     Satisfy All
  151. </FilesMatch>

  152. #
  153. # ErrorLog: The location of the error log file.
  154. # If you do not specify an ErrorLog directive within a <VirtualHost>
  155. # container, error messages relating to that virtual host will be
  156. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  157. # container, that host's errors will be logged there and not here.
  158. #
  159. ErrorLog logs/error_log

  160. #
  161. # LogLevel: Control the number of messages logged to the error_log.
  162. # Possible values include: debug, info, notice, warn, error, crit,
  163. # alert, emerg.
  164. #
  165. LogLevel warn

  166. <IfModule log_config_module>
  167.     #
  168.     # The following directives define some format nicknames for use with
  169.     # a CustomLog directive (see below).
  170.     #
  171.     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  172.     LogFormat "%h %l %u %t \"%r\" %>s %b" common

  173.     <IfModule logio_module>
  174.       # You need to enable mod_logio.c to use %I and %O
  175.       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  176.     </IfModule>

  177.     #
  178.     # The location and format of the access logfile (Common Logfile Format).
  179.     # If you do not define any access logfiles within a <VirtualHost>
  180.     # container, they will be logged here.  Contrariwise, if you *do*
  181.     # define per-<VirtualHost> access logfiles, transactions will be
  182.     # logged therein and *not* in this file.
  183.     #
  184.     CustomLog logs/access_log common

  185.     #
  186.     # If you prefer a logfile with access, agent, and referer information
  187.     # (Combined Logfile Format) you can use the following directive.
  188.     #
  189.     #CustomLog logs/access_log combined
  190. </IfModule>

  191. <IfModule alias_module>
  192.     #
  193.     # Redirect: Allows you to tell clients about documents that used to
  194.     # exist in your server's namespace, but do not anymore. The client
  195.     # will make a new request for the document at its new location.
  196.     # Example:
  197.     # Redirect permanent /foo [url]http://www.example.com/bar[/url]

  198.     #
  199.     # Alias: Maps web paths into filesystem paths and is used to
  200.     # access content that does not live under the DocumentRoot.
  201.     # Example:
  202.     # Alias /webpath /full/filesystem/path
  203.     #
  204.     # If you include a trailing / on /webpath then the server will
  205.     # require it to be present in the URL.  You will also likely
  206.     # need to provide a <Directory> section to allow access to
  207.     # the filesystem path.

  208.     #
  209.     # ScriptAlias: This controls which directories contain server scripts.
  210.     # ScriptAliases are essentially the same as Aliases, except that
  211.     # documents in the target directory are treated as applications and
  212.     # run by the server when requested rather than as documents sent to the
  213.     # client.  The same rules about trailing "/" apply to ScriptAlias
  214.     # directives as to Alias.
  215.     #
  216.     ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"

  217. </IfModule>

  218. <IfModule cgid_module>
  219.     #
  220.     # ScriptSock: On threaded servers, designate the path to the UNIX
  221.     # socket used to communicate with the CGI daemon of mod_cgid.
  222.     #
  223.     #Scriptsock logs/cgisock
  224. </IfModule>

  225. #
  226. # "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased
  227. # CGI directory exists, if you have that configured.
  228. #
  229. <Directory "/usr/local/apache/cgi-bin">
  230.     AllowOverride None
  231.     Options None
  232.     Order allow,deny
  233.     Allow from all
  234. </Directory>

  235. #
  236. # DefaultType: the default MIME type the server will use for a document
  237. # if it cannot otherwise determine one, such as from filename extensions.
  238. # If your server contains mostly text or HTML documents, "text/plain" is
  239. # a good value.  If most of your content is binary, such as applications
  240. # or images, you may want to use "application/octet-stream" instead to
  241. # keep browsers from trying to display binary files as though they are
  242. # text.
  243. #
  244. DefaultType text/plain

  245. <IfModule mime_module>
  246.     #
  247.     # TypesConfig points to the file containing the list of mappings from
  248.     # filename extension to MIME-type.
  249.     #
  250.     TypesConfig conf/mime.types

  251.     #
  252.     # AddType allows you to add to or override the MIME configuration
  253.     # file specified in TypesConfig for specific file types.
  254.     #
  255.     #AddType application/x-gzip .tgz
  256.     #
  257.     # AddEncoding allows you to have certain browsers uncompress
  258.     # information on the fly. Note: Not all browsers support this.
  259.     #
  260.     #AddEncoding x-compress .Z
  261.     #AddEncoding x-gzip .gz .tgz
  262.     #
  263.     # If the AddEncoding directives above are commented-out, then you
  264.     # probably should define those extensions to indicate media types:
  265.     #
  266.     AddType application/x-compress .Z
  267.     AddType application/x-gzip .gz .tgz
  268.     AddType application/x-httpd-php .php
  269.     #
  270.     # AddHandler allows you to map certain file extensions to "handlers":
  271.     # actions unrelated to filetype. These can be either built into the server
  272.     # or added with the Action directive (see below)
  273.     #
  274.     # To use CGI scripts outside of ScriptAliased directories:
  275.     # (You will also need to add "ExecCGI" to the "Options" directive.)
  276.     #
  277.     #AddHandler cgi-script .cgi

  278.     # For type maps (negotiated resources):
  279.     #AddHandler type-map var

  280.     #
  281.     # Filters allow you to process content before it is sent to the client.
  282.     #
  283.     # To parse .shtml files for server-side includes (SSI):
  284.     # (You will also need to add "Includes" to the "Options" directive.)
  285.     #
  286.     #AddType text/html .shtml
  287.     #AddOutputFilter INCLUDES .shtml
  288. </IfModule>

  289. #
  290. # The mod_mime_magic module allows the server to use various hints from the
  291. # contents of the file itself to determine its type.  The MIMEMagicFile
  292. # directive tells the module where the hint definitions are located.
  293. #
  294. #MIMEMagicFile conf/magic

  295. #
  296. # Customizable error responses come in three flavors:
  297. # 1) plain text 2) local redirects 3) external redirects
  298. #
  299. # Some examples:
  300. #ErrorDocument 500 "The server made a boo boo."
  301. #ErrorDocument 404 /missing.html
  302. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  303. #ErrorDocument 402 [url]http://www.example.com/subscription_info.html[/url]
  304. #

  305. #
  306. # EnableMMAP and EnableSendfile: On systems that support it,
  307. # memory-mapping or the sendfile syscall is used to deliver
  308. # files.  This usually improves server performance, but must
  309. # be turned off when serving from networked-mounted
  310. # filesystems or if support for these functions is otherwise
  311. # broken on your system.
  312. #
  313. #EnableMMAP off
  314. #EnableSendfile off


  315. # Supplemental configuration
  316. #
  317. # The configuration files in the conf/extra/ directory can be
  318. # included to add extra features or to modify the default configuration of
  319. # the server, or you may simply copy their contents here and change as
  320. # necessary.

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

  323. # Multi-language error messages
  324. #Include conf/extra/httpd-multilang-errordoc.conf

  325. # Fancy directory listings
  326. #Include conf/extra/httpd-autoindex.conf

  327. # Language settings
  328. #Include conf/extra/httpd-languages.conf

  329. # User home directories
  330. #Include conf/extra/httpd-userdir.conf

  331. # Real-time info on requests and configuration
  332. #Include conf/extra/httpd-info.conf

  333. # Virtual hosts
  334. Include conf/extra/httpd-vhosts.conf

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

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

  339. # Various default settings
  340. #Include conf/extra/httpd-default.conf

  341. # Secure (SSL/TLS) connections
  342. #Include conf/extra/httpd-ssl.conf
  343. #
  344. # Note: The following must must be present to support
  345. #       starting without SSL on platforms with no /dev/random equivalent
  346. #       but a statically compiled-in mod_ssl.
  347. #
  348. <IfModule ssl_module>
  349. SSLRandomSeed startup builtin
  350. SSLRandomSeed connect builtin
  351. </IfModule>
  352. UseCanonicalName off
复制代码

论坛徽章:
0
6 [报告]
发表于 2007-10-25 12:01 |只看该作者
唉,最怕这种自己编译又不会配置的

http://man.chinaunix.net/newsoft ... w/mod/mod_info.html
你先按这个文档的说明,把 配置找出来

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-07-06 06:20:00
7 [报告]
发表于 2007-10-25 12:07 |只看该作者
主要是好像没有这项东西,

论坛徽章:
0
8 [报告]
发表于 2007-10-25 12:14 |只看该作者
你 httpd -l 就知道有沒有那個模塊了

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-07-06 06:20:00
9 [报告]
发表于 2007-10-25 12:46 |只看该作者
安装 apache 控制台没有 httpd 命令,

论坛徽章:
0
10 [报告]
发表于 2007-10-25 13:24 |只看该作者
你在你的 /usr/local/apache 下的 bin 目錄和 sbin 目錄裏找找看
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP