Comments on Configuring Apache for Maximum Performance
Apache server performance can be improved by adding additional hardware resources such as RAM, faster CPU etc. But, most of the time, the same result can be achieved by custom configuration of the server. This article looks into getting maximum performance out of Apache with the existing hardware resources, specifically on the Linux systems.
8 Comment(s)
Comments
Thanks for the great article!
Regarding "2.2 Choose appropriate MPM": The main point choosing the right MPM is if the MPM is supported by the other necessary modules and used web applications. E.g. modules like Embperl only work together with the Prefork MPM.
But I'm happy to see that separating the servers for static and dynamic content is mentioned since I see this as one of the most efficient methods to save resources. I usually do this with several backend servers: One for mod_perl, one for php, etc.
The article is a bit vague in chapter 4 about compression and caching. While caching might be good for the client response times, i would personaly stay away from compression. It adds cpu load to the server and even thou it adds only small amount of cpu usage, it could be used to stress the server remotely.
Also, the article is missing very crucial part of tuning web server for fast response times and big amount of concurrent users: Kernel tuning. There's no mention of even simple parameters like how many file descriptors can be open at any time by user. For big sites this is crucial. And it comes really a requirement if there's any php/database code.
It would also be good article idea if to comb thru php options with apache in mind as default rules for php as apache module are very easy to ddos your machine (namely, no limitations on concurrent database connections)
This is very helpful...
You can use nginx as frontend for static content and apache as backend. Nginx can handle a lot of connections and fix the issues regarding apache keepalive.
Example:
server {
listen 192.168.1.1:80 default backlog=10000;
server_name mywebsite.com www.mywebsite.com;
location / {
# Pass to Apache server.
proxy_pass http://192.168.1.1:81;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Static files location
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|htc)$ {
root /home/myusername/www/mywebsite.com;
expires 24h;
}
}
From apache doc:
Allow Override
"When this directive is set to None
, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess
files in the filesystem."
It seems to me that it says exactly the opposite as you are stating in your article, what am I getting wrong?
Thanks for such a great article.
this articleis pretty old (2005) can somebody update this?
Yes article are old, but information are really good, I like it
Regards
Server Management