I have httpd down right now without any error outputted on errors_log
my server is with 4 Quad-Core Intel Xeon 2.66GHz (16 CPu) and 16GB of RAM. Is running CentOS Linux 5.1 and Apache/2.2.8. The site that will be running in this server has an average of 360,000 pageviews daily, so we want to make sure to tweak the configuration at its best.
my httpd.Conf :
Include "/usr/local/apache/conf/in
cludes/pre
_main_glob
al.conf"
Include "/usr/local/apache/conf/in
cludes/pre
_main_2.co
nf"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apac
he_conf_di
stiller --update #
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/buil
d_apache_c
onf #
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at:
http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apac
he2/main.d
efault #
# /var/cpanel/templates/apac
he2/main.l
ocal #
# /var/cpanel/templates/apac
he2/vhost.
default #
# /var/cpanel/templates/apac
he2/vhost.
local #
# /var/cpanel/templates/apac
he2/ssl_vh
ost.defaul
t #
# /var/cpanel/templates/apac
he2/ssl_vh
ost.local #
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
LoadModule auth_passthrough_module modules/mod_auth_passthrou
gh.so
LoadModule bwlimited_module modules/mod_bwlimited.so
LoadModule frontpage_module modules/mod_frontpage.so
LoadModule bw_module modules/mod_bw.so
LoadModule evasive20_module modules/mod_evasive20.so
Include "/usr/local/apache/conf/ph
p.conf"
Include "/usr/local/apache/conf/mo
d_bandwidt
h.conf"
LoadModule security2_module modules/mod_security2.so
#Include "/etc/httpd/conf/modsecuri
ty.conf"
ErrorLog "logs/error_log"
DefaultType text/plain
<Directory "/">
Options All
AllowOverride All
</Directory>
<Directory "/usr/local/apache/htdocs"
>
Options Includes Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Files ~ "^error_log$">
Order allow,deny
Deny from all
Satisfy All
</Files>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog "logs/access_log" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin
/"
</IfModule>
<Directory "/usr/local/apache/cgi-bin
">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apac
he_conf_di
stiller --update #
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/buil
d_apache_c
onf #
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at:
http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apac
he2/main.d
efault #
# /var/cpanel/templates/apac
he2/main.l
ocal #
# /var/cpanel/templates/apac
he2/vhost.
default #
# /var/cpanel/templates/apac
he2/vhost.
local #
# /var/cpanel/templates/apac
he2/ssl_vh
ost.defaul
t #
# /var/cpanel/templates/apac
he2/ssl_vh
ost.local #
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
PidFile logs/httpd.pid
LockFile logs/accept.lock
# Defined in /var/cpanel/cpanel.config:
apache_port
Listen 0.0.0.0:80
Timeout 300
User nobody
Group nobody
ExtendedStatus On
ServerAdmin soso@soso.com
ServerName server.soso.org
LogLevel warn
ServerSignature Off
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/
leechprote
ct
RewriteLock /usr/local/apache/logs/rew
rite_lock
UserDir public_html
DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/usr/local/apache/logs
/ssl_scach
e
SSLSessionCacheTimeout 300
SSLMutex file:/usr/local/apache/log
s/ssl_mute
x
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
<IfDefine SSL>
# Defined in /var/cpanel/cpanel.config:
apache_ssl_port
Listen 0.0.0.0:443
AddType application/x-x509-ca-cert
.crt
AddType application/x-pkcs7-crl .crl
</IfDefine>
#AddHandler cgi-script .cgi .pl .plx .ppl .perl
AddHandler server-parsed .shtml
AddType text/html .shtml
AddType application/x-tar .tgz
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlc .wmlc
AddType application/vnd.wap.wmlscr
iptc .wmlsc
<Location /whm-server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
# SUEXEC is supported
Include "/usr/local/apache/conf/in
cludes/pre
_virtualho
st_global.
conf"
Include "/usr/local/apache/conf/in
cludes/pre
_virtualho
st_2.conf"
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
NameVirtualHost *
# Default vhost for unbound IPs
<VirtualHost *>
ServerName server.soso.org
DocumentRoot /usr/local/apache/htdocs
ServerAdmin soso@soso.com
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
# SSL
<IfDefine SSL>
</IfDefine>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 7
DOSSiteCount 100
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 300
</IfModule>
NameVirtualHost xxx.xxx.152.250:80
<VirtualHost xxx.xxx.152.250:80>
ServerName soso.org
ServerAlias soso.com
www.soso.com ServerAlias eco.soso.org
www.eco.soso.org ServerAlias soso.info
www.soso.info ServerAlias soso.biz
www.soso.biz ServerAlias soso.cc
www.soso.cc ServerAlias
www.soso.org DocumentRoot /home/soso/public_html
ServerAdmin webmaster@soso.org
## User soso # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup soso soso
</IfModule>
<IfModule concurrent_php.c>
php4_admin_value open_basedir "/home/soso:/usr/lib/php:/
usr/php4/l
ib/php:/us
r/local/li
b/php:/usr
/local/php
4/lib/php:
/tmp"
php5_admin_value open_basedir "/home/soso:/usr/lib/php:/
usr/local/
lib/php:/t
mp"
</IfModule>
<IfModule !concurrent_php.c>
<IfModule mod_php4.c>
php_admin_value open_basedir "/home/soso:/usr/lib/php:/
usr/php4/l
ib/php:/us
r/local/li
b/php:/usr
/local/php
4/lib/php:
/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/soso:/usr/lib/php:/
usr/local/
lib/php:/t
mp"
</IfModule>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/home/soso:/usr/lib/php:/
usr/php4/l
ib/php:/us
r/local/li
b/php:/usr
/local/php
4/lib/php:
/tmp"
</IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup soso soso
</IfModule>
CustomLog /usr/local/apache/domlogs/
soso.org-b
ytes_log "%{%s}t %I .\n%{%s}t %O ."
CustomLog /usr/local/apache/domlogs/
soso.org combined
</VirtualHost>
ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
Alias /bandwidth/ /usr/local/bandmin/htdocs/
Alias /sys_cpanel/ /usr/local/cpanel/sys_cpan
el/
Alias /java-sys/ /usr/local/cpanel/java-sys
/
Alias /img-sys/ /usr/local/cpanel/img-sys/
Alias /akopia/ /usr/local/cpanel/3rdparty
/interchan
ge/share/a
kopia/
Alias /neo-images/ /usr/local/cpanel/base/neo
mail/neo-i
mages/
Alias /mailman/archives/ /usr/local/cpanel/3rdparty
/mailman/a
rchives/pu
blic/
Alias /pipermail/ /usr/local/cpanel/3rdparty
/mailman/a
rchives/pu
blic/
Alias /interchange/ /usr/local/cpanel/3rdparty
/interchan
ge/share/i
nterchange
/
Alias /interchange-5/ /usr/local/cpanel/3rdparty
/interchan
ge/share/i
nterchange
-5/
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty
/mailman/c
gi-bin/
ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/
redirect.c
gi
ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/
sredirect.
cgi
ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/
redirect.c
gi
ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/
redirect.c
gi
ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/
sredirect.
cgi
ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/
wredirect.
cgi
ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/
whmredirec
t.cgi
ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/
swhmredire
ct.cgi
Include "/usr/local/apache/conf/in
cludes/pos
t_virtualh
ost_global
.conf"
Include "/usr/local/apache/conf/in
cludes/pos
t_virtualh
ost_2.conf
"
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
---
my.cnf
[mysqld]
set-variable=local-infile=
0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysq
l.sock
safe-show-database
old_passwords
back_log = 75
skip-innodb
max_connections = 1500
key_buffer = 1024M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 4000
thread_cache_size = 512
wait_timeout = 14400
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
net_buffer_length = 16384
max_connect_errors = 10
thread_concurrency = 32
read_rnd_buffer_size = 786432
bulk_insert_buffer_size = 8M
query_cache_limit = 5M
query_cache_size = 144M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_si
ze = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
[mysqld_safe]
err-log=/var/log/mysqld.lo
g
pid-file=/var/lib/mysql/my
sql.pid
nice = -10
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 64M
[myisamchk]
key_buffer = 1024M
sort_buffer = 384M
read_buffer = 256M
write_buffer = 256M
[mysqlhotcopy]
interactive-timeout
--------------------------
----------
----------
----------
----------
-----
top :
--------------------------
----------
----------
----------
----------
------
top - 18:27:31 up 2:51, 2 users, load average: 1.91, 2.55, 2.58
Tasks: 533 total, 2 running, 531 sleeping, 0 stopped, 0 zombie
Cpu(s): 7.0%us, 3.6%sy, 0.0%ni, 89.1%id, 0.1%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 16632148k total, 2014536k used, 14617612k free, 102904k buffers
Swap: 4192924k total, 0k used, 4192924k free, 737684k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22527 mysql 5 -10 1228m 174m 3040 S 81 1.1 22:52.61 mysqld
3717 nobody 16 0 31248 13m 4052 S 6 0.1 0:01.08 httpd
3680 nobody 16 0 31380 13m 4060 R 4 0.1 0:03.07 httpd
3748 nobody 15 0 31044 13m 4052 S 4 0.1 0:01.02 httpd
3687 nobody 15 0 31324 13m 4064 S 4 0.1 0:01.53 httpd
3774 nobody 16 0 31324 13m 4056 S 4 0.1 0:00.72 httpd
3797 nobody 15 0 31324 13m 4060 S 4 0.1 0:02.20 httpd
3850 nobody 15 0 31380 13m 4068 S 4 0.1 0:02.11 httpd
3858 nobody 15 0 31020 13m 4060 S 4 0.1 0:02.91 httpd
3861 nobody 16 0 31252 13m 4116 S 4 0.1 0:01.46 httpd
3900 nobody 15 0 31332 13m 4056 S 4 0.1 0:01.22 httpd
3649 nobody 15 0 31316 13m 4060 S 3 0.1 0:01.06 httpd
3696 nobody 15 0 31020 13m 4052 S 3 0.1 0:01.20 httpd
3654 nobody 15 0 31308 13m 4124 S 3 0.1 0:02.05 httpd
3707 nobody 16 0 31552 13m 4060 S 3 0.1 0:02.03 httpd
3711 nobody 15 0 31072 13m 4060 S 3 0.1 0:02.52 httpd
3790 nobody 15 0 31376 13m 4064 S 3 0.1 0:02.00 httpd
3794 nobody 15 0 31048 13m 4060 S 3 0.1 0:01.10 httpd
3897 nobody 15 0 30764 13m 4404 S 3 0.1 0:01.76 httpd
3907 nobody 15 0 31316 13m 4060 S 3 0.1 0:02.35 httpd
3884 nobody 15 0 31156 13m 4056 S 2 0.1 0:00.99 httpd
3664 nobody 15 0 31308 13m 4060 S 2 0.1 0:01.97 httpd
3838 nobody 15 0 31340 13m 4056 S 2 0.1 0:00.88 httpd
--------------------------
----------
----------
----------
----------
----------
----------
----------
--
root@server [~]# netstat -lpan | grep :80 | wc -l
1657
root@server [~]#
--------------------------
----------
----------
----------
----------
----------
----------
--------
So anyone expert on Apache configuration please bring us on some light on what to change to optimize this web server and solv this problem ??
Start Free Trial