由 刀疤鱼 在 12-05-2002 14:02 发表:
南北站长救命!!! Vbb论坛+Redhat Linux7.3 故障请教.
南北站长救命!!! Vbb论坛+Redhat Linux7.3 故障请教.
各位,
以前我的论坛是 Redhat linux7.2+vbb2.2.4 数据库大小在3G左右,速度奇快.
最近服务器崩溃,重新安装了,VBB
可是现在只能到50人左右,就会出现cpu占用率达到100%的情况.
我更换了好几个Vbb 版本,2.2.8的紫桐版,篝火版,火狐狸版,后来干脆升级到了2.2.9的篝火标准中文版.故障依旧.
这次安装服务器唯一的不同就是: 以前我在图形方式下面配置Apache,这次因为未知原因进不了图形方式,我就手工配置了apache.
我现在最怀疑是不是我的apache没有配置好的原因 ? 进程监视里面httpd进程总是占用100%的cpu资源,我可是双PIII-650 + 1G的内存的服务器呢.
我的论坛是这个: http://bbs.chinaetv.com/bbs/index.php
我的配置Apache文件如下,请高手指教,谢谢!
ServerType StandAlone
ServerRoot /etc/httpd/
#LoadModule mmap_static_module modules/mod_mmap_static.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule env_module modules/mod_env.so
LoadModule config_log_module modules/mod_log_config.so
LoadModule agent_log_module modules/mod_log_agent.so
LoadModule referer_log_module modules/mod_log_referer.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule status_module modules/mod_status.so
LoadModule info_module modules/mod_info.so
LoadModule includes_module modules/mod_include.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule asis_module modules/mod_asis.so
LoadModule imap_module modules/mod_imap.so
LoadModule action_module modules/mod_actions.so
#LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule anon_auth_module modules/mod_auth_anon.so
LoadModule db_auth_module modules/mod_auth_db.so
#LoadModule digest_module modules/mod_digest.so
#LoadModule proxy_module modules/libproxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule example_module modules/mod_example.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule bandwidth_module modules/mod_bandwidth.so
#LoadModule put_module modules/mod_put.so
1<ifdefine have_perl="">
2
3LoadModule perl_module modules/libperl.so
4
5</ifdefine>
1<ifdefine have_php="">
2
3LoadModule php_module modules/mod_php.so
4
5</ifdefine>
1<ifdefine have_php3="">
2
3LoadModule php3_module modules/libphp3.so
4
5</ifdefine>
1<ifdefine have_php4="">
2
3LoadModule php4_module modules/libphp4.so
4
5</ifdefine>
1<ifdefine have_dav="">
2
3LoadModule dav_module modules/libdav.so
4
5</ifdefine>
1<ifdefine have_roaming="">
2
3LoadModule roaming_module modules/mod_roaming.so
4
5</ifdefine>
1<ifdefine have_ssl="">
2
3LoadModule ssl_module modules/libssl.so
4
5</ifdefine>
ClearModuleList
#AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_log_agent.c
AddModule mod_log_referer.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
AddModule mod_auth_db.c
#AddModule mod_digest.c
#AddModule mod_proxy.c
#AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
#AddModule mod_usertrack.c
#AddModule mod_example.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
#AddModule mod_bandwidth.c
#AddModule mod_put.c
1<ifdefine have_perl="">
2
3AddModule mod_perl.c
4
5</ifdefine>
1<ifdefine have_php="">
2
3AddModule mod_php.c
4
5</ifdefine>
1<ifdefine have_php3="">
2
3AddModule mod_php3.c
4
5</ifdefine>
1<ifdefine have_php4="">
2
3AddModule mod_php4.c
4
5</ifdefine>
1<ifdefine have_dav="">
2
3AddModule mod_dav.c
4
5</ifdefine>
1<ifdefine have_roaming="">
2
3AddModule mod_roaming.c
4
5</ifdefine>
1<ifdefine have_ssl="">
2
3AddModule mod_ssl.c
4
5</ifdefine>
ServerName bbs.chinaetv.com
ServerAdmin [email protected]
Listen 202.103.67.89:80
Port 80
ScoreBoardFile /var/run/httpd.scoreboard
LockFile /var/lock/httpd.lock
PidFile /var/run/httpd.pid
CoreDumpDirectory "/etc/httpd"
DocumentRoot /var/www/html
UserDir public_html
IndexOptions FancyIndexing
Who runs the server?
User apache
Group apache
Performance parameters
MaxClients 256
TimeOut 300
KeepAlive On
MaxKeepAliveRequests 150
MaxRequestsPerChild 15000
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 25
StartServers 10
Error documents
Misc
AccessFileName .htaccess
UseCanonicalName on
TypesConfig /etc/mime.types
DefaultType "text/plain"
Defaults for virtual hosts
ServerSignature on
Logs
ErrorLog /var/log/httpd/error_log
LogLevel warn
HostNameLookups Off
Need to fix this
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/httpd/access_log common
Alias /icons/ "/var/www/icons/"
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
ScriptAlias: This controls which directories contain server scripts.
ScriptAliases are essentially the same as Aliases, except that
documents in the realname directory are treated as applications and
run by the server when requested rather than as documents sent to the client.
The same rules about trailing "/" apply to ScriptAlias directives as to
Alias.
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
"/var/www/cgi-bin" should be changed to whatever your ScriptAliased
CGI directory exists, if you have that configured.
1<directory "="" cgi-bin"="" var="" www="">
2
3AllowOverride None
4
5Options ExecCGI
6
7Order allow,deny
8
9Allow from all
10
11</directory>
Redirect allows you to tell clients about documents which used to exist in
your server's namespace, but do not anymore. This allows you to tell the
clients where to look for the relocated document.
Format: Redirect old-URI new-URL
Directives controlling the display of server-generated directory listings.
FancyIndexing: whether you want fancy directory indexing or standard
IndexOptions FancyIndexing
AddIcon* directives tell the server which icon to show for different
files or filename extensions. These are only displayed for
FancyIndexed directories.
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon: which icon to show for files which do not have an icon
explicitly set.
DefaultIcon /icons/unknown.gif
AddDescription: allows you to place a short description after a file in
server-generated indexes. These are only displayed for FancyIndexed
directories.
Format: AddDescription "description" filename
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz
ReadmeName: the name of the README file the server will look for by
default, and append to directory listings.
HeaderName: the name of a file which should be prepended to
directory indexes.
The server will first look for name.html and include it if found.
If name.html doesn't exist, the server will then look for name.txt
and include it as plaintext if found.
ReadmeName README
HeaderName HEADER
IndexIgnore: a set of filenames which directory indexing should ignore
and not include in the listing. Shell-style wildcarding is permitted.
IndexIgnore .??* ~ # HEADER README RCS CVS *,v *,t
AddEncoding: allows you to have certain browsers (Mosaic/X 2.1+) uncompress
information on the fly. Note: Not all browsers support this.
Despite the name similarity, the following Add* directives have nothing
to do with the FancyIndexing customization directives above.
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddLanguage: allows you to specify the language of a document. You can
then use content negotiation to give a browser a file in a language
it can understand. Note that the suffix does not have to be the same
as the language keyword --- those with documents in Polish (whose
net-standard language code is pl) may wish to use "AddLanguage pl .po"
to avoid the ambiguity with the common suffix for perl scripts.
AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it
LanguagePriority: allows you to give precedence to some languages
in case of a tie during content negotiation.
Just list the languages in decreasing order of preference.
LanguagePriority en fr de
AddType: allows you to tweak mime.types without actually editing it, or to
make certain files to be certain types.
The following is for PHP4 (conficts with PHP/FI, below):
1<ifmodule mod_php4.c="">
2
3AddType application/x-httpd-php .php4 .php3 .phtml .php
4
5AddType application/x-httpd-php-source .phps
6
7</ifmodule>
The following is for PHP3:
1<ifmodule mod_php3.c="">
2
3AddType application/x-httpd-php3 .php3
4
5AddType application/x-httpd-php3-source .phps
6
7</ifmodule>
The following is for PHP/FI (PHP2):
1<ifmodule mod_php.c="">
2
3AddType application/x-httpd-php .phtml
4
5</ifmodule>
AddType application/x-tar .tgz
AddHandler: allows you to map certain file extensions to "handlers",
actions unrelated to filetype. These can be either built into the server
or added with the Action command (see below)
If you want to use server side includes, or CGI outside
ScriptAliased directories, uncomment the following lines.
To use CGI scripts:
#AddHandler cgi-script .cgi
To use server-parsed HTML files
AddType text/html .shtml
AddHandler server-parsed .shtml
Uncomment the following line to enable Apache's send-asis HTTP file
feature
#AddHandler send-as-is asis
If you wish to use server-parsed imagemap files, use
AddHandler imap-file map
The following directives modify normal HTTP response behavior.
The first directive disables keepalive for Netscape 2.x and browsers that
spoof it. There are known problems with these browser implementations.
The second directive is for Microsoft Internet Explorer 4.0b2
which has a broken HTTP/1.1 implementation and does not properly
support keepalive when it is used on 301 or 302 (redirect) responses.
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
The following directive disables HTTP/1.1 responses to browsers which
are in violation of the HTTP/1.0 spec by not being able to grok a
basic 1.1 response.
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
If the perl module is installed, this will be enabled.
1<ifmodule mod_perl.c="">
2
3Alias /perl/ /var/www/perl/
4
5<location perl="">
6
7SetHandler perl-script
8
9PerlHandler Apache::Registry
10
11Options +ExecCGI
12
13</location>
14</ifmodule>
Allow http put (such as Netscape Gold's publish feature)
Use htpasswd to generate /etc/httpd/conf/passwd.
You must unremark these two lines at the top of this file as well:
#LoadModule put_module modules/mod_put.so
#AddModule mod_put.c
#Alias /upload /tmp
1<location upload="">
2
3# EnablePut On
4
5# AuthType Basic
6
7# AuthName Temporary
8
9# AuthUserFile /etc/httpd/conf/passwd
10
11# EnableDelete Off
12
13# umask 007
14
15# <limit put="">
16
17# require valid-user
18
19# </limit>
20
21#</location>
Allow server status reports, with the URL of http://servername/server-status
Change the ".your_domain.com" to match your domain to enable.
1<location server-status="">
2
3# SetHandler server-status
4
5# Order deny,allow
6
7# Deny from all
8
9# Allow from .your_domain.com
10
11#</location>
Allow remote server configuration reports, with the URL of
http://servername/server-info (requires that mod_info.c be loaded).
Change the ".your_domain.com" to match your domain to enable.
1<location server-info="">
2
3# SetHandler server-info
4
5# Order deny,allow
6
7# Deny from all
8
9# Allow from .your_domain.com
10
11#</location>
Allow access to local system documentation from localhost
Alias /doc/ /usr/share/doc/
1<location doc="">
2
3order deny,allow
4
5deny from all
6
7allow from localhost
8
9Options Indexes FollowSymLinks
10
11</location>
1<ifdefine have_ssl="">
2
3##
4
5## SSL Virtual Host Context
6
7##
8
9
10
11# Apache will only listen on port 80 by default. Defining the virtual server
12
13# (below) won't make it automatically listen on the virtual server's port.
14
15Listen 443
16
17
18
19<virtualhost _default_:443="">
20
21
22
23# General setup for the virtual host
24
25DocumentRoot "/var/www/html"
26
27
28
29# SSL Engine Switch:
30
31# Enable/Disable SSL for this virtual host.
32
33SSLEngine on
34
35
36
37# SSL Cipher Suite:
38
39# List the ciphers that the client is permitted to negotiate.
40
41# See the mod_ssl documentation for a complete list.
42
43#SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
44
45
46
47# Server Certificate:
48
49# Point SSLCertificateFile at a PEM encoded certificate. If
50
51# the certificate is encrypted, then you will be prompted for a
52
53# pass phrase. Note that a kill -HUP will prompt again. A test
54
55# certificate can be generated with `make certificate' under
56
57# built time. Keep in mind that if you've both a RSA and a DSA
58
59# certificate you can configure both in parallel (to also allow
60
61# the use of DSA ciphers, etc.)
62
63SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
64
65#SSLCertificateFile /etc/httpd/conf/ssl.crt/server-dsa.crt
66
67
68
69# Server Private Key:
70
71# If the key is not combined with the certificate, use this
72
73# directive to point at the key file. Keep in mind that if
74
75# you've both a RSA and a DSA private key you can configure
76
77# both in parallel (to also allow the use of DSA ciphers, etc.)
78
79SSLCertificateKeyFile /etc/htt</virtualhost></ifdefine>