BEFORE USING BACK UP YOUR MY.CNF AND HTTPD.CONF. I MEAN IT, BACK THEM UP!!!!!

Here is a base I am using to tune my server which runs Black Hat Cloaker Sites Generator, and Landing Page Builder. I'm doing a high volume of traffic, so this should be a great starting place for most. Load is between 1 and 2 on a quad core server. I have 12GB of ram, but this is only using around 6.5gb, so it should be fine for those with 8GB servers (which seems to be about the norm these days anyway. I have a few buffers excessively high at the moment, so i'll tune those down as I go and post the results. My database is ~17GB in size which is also probably pretty average. We have a large enough key buffer to keep all of our myisam full text data from LPB fully in memory. This is important because each query to LPB does a fulltext search. If these indexes aren't in memory, it gets slow. We also have a large enough innodb buffer pool so the majority of theBlack Hat Cloaker Sites Generator keyword pages fit into memory. This is important so your highest traffic pages load from memory which not only cuts page load times, but it also keeps you from wasting cpu cycles or disk IO. This also sets your myisam fulltext search min word length to 2 characters which is what I suggest and always use myself. 

Couple things to note. If you have never set your innodb_log_file_size before, or you don't currently have an entry for it, YOUR SERVER WILL NOT START IF YOU USE MINE. In order to change your innodb_log_file_size, you MUST stop mysql (service mysqld stop), then head to your mysql data directory (usually /var/lib/mysql) then find two files called ib_logfile0 and ib_logfile1. Rename both files to ib_logfile0.old and ib_logfile1.old. DO NOT DELETE THEM! Make the below changes to your my.cnf, then save and start mysql. WHen you restart it will create two new log files of whatever new size it is that you specified. If you do not follow the above, the server WILL NOT start. Make sure your sites work and everything is running normally, then and only then delete the old files. Increasing the size of these two files helps with disk IO because data is flushed to disk less often. 

Here is my my.cnf:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
default-time-zone='-7:00'
max_connections = 256
key_buffer = 400M
join_buffer_size = 1M
read_buffer_size = 4M
sort_buffer_size = 1M
table_cache = 1024
open_files_limit=5000
thread_cache_size = 64
wait_timeout = 900
connect_timeout = 10
max_allowed_packet = 32M
max_connect_errors = 100000
query_cache_size = 96M
query_cache_type = 1
max_heap_table_size = 128M
tmp_table_size = 128M
thread_concurrency = 4
innodb_buffer_pool_size = 3200M
innodb_log_file_size = 250M
innodb_log_buffer_size=4M
innodb_thread_concurrency=4
transaction-isolation=READ-COMMITTED
innodb_flush_method=O_DIRECT
innodb_file_per_table
ft_min_word_len=2
# To enable the InnoDB Plugin, uncomment the 2 next lines
ignore-builtin-innodb
plugin-load=innodb=ha_innodb_plugin.so

# To enable InnoDB-related INFORMATION_SCHEMA tables
# Join the following options to above directive
  ;innodb_trx=ha_innodb_plugin.so
  ;innodb_locks=ha_innodb_plugin.so
  ;innodb_cmp=ha_innodb_plugin.so
  ;innodb_cmp_reset=ha_innodb_plugin.so
  ;innodb_cmpmem=ha_innodb_plugin.so
  ;innodb_cmpmem_reset=ha_innodb_plugin.so


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


[mysqldump]
quick
max_allowed_packet = 32M

[myisamchk]
ft_min_word_len=2

Next we have the httpd.conf. It's pretty basic, but an important part of tuning. I average 15-20 requests a second, so it is important that I have that many start servers. When your start servers (and min/max free servers) are set too low, a new process needs to be spawned at times of high load or as new requests come in. These spawning process  are VERY cpu expensive, so they drive up load when there is no reason for them to. By tuning like the following, there are always AT LEAST 20 http process sitting around waiting for an incoming connection. The other important thing to note is the fact that I am using prefork and have commented out the worker section. Worker is multithreaded, but it doesn't play well with php and in some instances eats up too much memory. So, this is a good starting place. The max requests per child setting kills and respawns an apache parent process when the limit is reached. This isn't set to 0 (infinite) because http can increase memory usage over time, so respawning them from time to time is a good idea.

Timeout 15
KeepAlive Off
# prefork MPM
# StartServers: number of server process to start
# MinSpareServers: minimum number of server process which are kept spare
# MaxSpareServers: maximum number of server process which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server process allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers      60
MinSpareServers   30
MaxSpareServers   60
ServerLimit       96
MaxClients        96
MaxRequestsPerChild  4000
</IfModule>

# worker MPM
# StartServers: initial number of server process to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
#<IfModule worker.c>
#StartServers         2
#MaxClients         150
#MinSpareThreads     25
#MaxSpareThreads     75 
#ThreadsPerChild     25
#MaxRequestsPerChild  5000
#</IfModule>

User apache
Group apache

Use all of the above at your own risk. As always, back everything up before making any changes. I may not be able to help you if you crash your server