Jul 31
If you are planning to test a remote or local web server running on 80 port it could be easily done by using telnet command from the linux shell or windows command line.
telnet www.yahoo.com 80
GET / HTTP/1.1
Host: www.yahoo.com
and hit enter two times and voila 
Jul 30
We will soon perform some benchmarking with thttpd and large file serving, but I am confident that it will be one of the best.
Why? Because it’s FAST and I mean it…:
- it doesn’t fork
- perfect memory management
- small runtime
- implements http 1.1 protocol with minimum requirements
- secure and robust
Jul 27
You can easily check a web server header using a simple telnet utility.
telnet www.yahoo.com 80
HEAD / HTTP/1.0
and hit Enter two times.
You will get a header response with the HTTP status code….
HTTP/1.1 200 OK
Date: Mon, 31 Jul 2006 05:47:22 GMT
P3P: policyref=”http://p3p.yahoo.com/w3c/p3p.xml”, CP=”CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV”
Cache-Control: private
Vary: User-Agent
Set-Cookie: FPB=7cum1i2o812cr6ba; expires=Thu, 01 Jun 2006 19:00:00 GMT; path=/; domain=www.yahoo.com
Connection: close
Content-Type: text/html
Connection closed by foreign host.
Jul 25
Ok here is the deal if you do not want to switch to other web server software (e.g. Cherokee, thttpd, roxen, boa, lighttpd) and want the best performance for serving static files that do not often change the best solution is to use mod_mmap_static module. This module is not compiled in by default and you will need to recompile apache to enable it:
–enable-module=mmap_static
Don’t forget if any of your web files change - you will need to restart Apache web server…. it’s up to you now - use it or not 
Jul 24
In httpd.conf there is a directive MaxClients that is usually defined ~ 150. This value allows to serve more simultaneous requests and process queue more faster.
Please note that you will need to recompile apache httpd (you must edit the HARD_SERVER_LIMIT entry in httpd.h and recompile) in order to set it higher that 256. Remember that each daemon requires more memory and an average figure for each process is 4…8MB. For example, you can set-up MaxClients value to ~250 if you have a 1GB of RAM.
Enjoy!
Jul 18
For best performance you need to strip down your apache binary - the less modules, the less memory used the better speed / performance you will get. If you are loading modules via DSO you can easily remove module from the loading list by commenting out the LoadModule option. If you have a module linked statically you will need to recompile apache http daemon.
By default 1.3 has compiled in the following modules:
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_access.c
mod_auth.c
mod_setenvif.c
you will need to compile apache and remove modules that are not needed, for example: mod_auth.c mod_imap.c using the following syntax:
./configure –disable-module=auth –disable-module=imap
I suggest you disable everything, except
mod_mime
mod_dir
mod_log_config
You can of course remove log config module if no logging is needed. If your site requires any specific modules or the ones listed above - you will need to enable them at the compilation time. It’s try and see option, for those, who are not 100% sure what modules are really needed.
Apache 2.0.* has compiled in the following modules by default:
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
The most critical ones are again, mod_mime;mod_dir; less mod_log_config.
Please note than DSO support is activated/enabled by default and you can turn it off by removing this module at the compilation time.
Enjoy!
Jul 16
If you have mod_status support compiled in your apache (either statically or using DSO) and activated in httpd.conf file with ExtendedStatus On you are probably affecting your site and server performance because every request to apache (e.g. web site hit) will generate multiple queries to gettimeofday or times function/system call depending on your Operating System.Make sure it’s turned off for the best performance:
ExtendedStatus off
in your httpd.conf file
Jul 10
The option MaxKeepAliveRequests specifies the number of requests allowed per connection when the KeepAlive on has been set. When the value of this option is set to 0 then unlimited requests are allowed on the server.
For better server performance, it’s recommended to allow unlimited requests or you can always define it with a high value, for example, 10,000.
Jul 06
Boosting apache performance in high load environments.
I suggest decreasing timeout value and keepalivetimeout, as well as other values listed and described below.
Original timeout has been set to 300 by default. I suggest decreasing it to 120 (2 minutes) so all connections will timeout after 2 minutes. period.
Timeout 120
By default, keepalive is turned on for apache daemon. This is good, but there are some cases that it should be turned off as there is no gain. Usually this happens when you are serving medium to large files with a lot concurrent connections. Play around and see what works the best. Please pay attention to keepalive timeout as well (we will shortly post sysctl tweaks for network stack as well).
KeepAlive On
Maxkeepaliverequests is the maximum number of http requests over one persistent connection. If you are serving a lot of small files, increasing this value will boost overal performance. If the persistent connectivity is closed and browser requests a new request, a new connection will open, thus, slowing down overal performance a bit. This value however doesn’t apply if you have keepalive’s turned off.
MaxKeepAliveRequests 1000
Keepalivetimeout is the value in seconds to wait for the next request over the same connection for the same client. If you are serving a lot of small files, increasing this value will help. In another case, if you have thousands of concurrent connections, decreasing this value will boost the performance.
KeepAliveTimeout 15
For high load servers, please test KeepAliveTimeout with 2…5 seconds and see how does it affect you.
I hope this helps you. Enjoy
DC
Jul 06
If you need to configure your apache via .htaccess file (for example giving custom config overriding feature to non-root users on the system and not to affect/misconfigure other web sites, except their own) config .htaccess is a good solution to solve this problem.
By default, I suggest turning off override for root directory:
<Directory>
AllowOverride None
</Directory>
and only activating .htaccess file overring feature for required directory or web site:
<Directory /etc/webs/www.domain.com/public_html/>
AllowOverride All
</Directory>
In the above case, we allow AllowOverride All to /etc/webs/www.domain.com/public_html/ folder.
If we define/enable .htaccess to the exact dir we require it to be enabled, the web server will have better performance - no need to lookup every directory recursively to check if .htaccess support is enabled for the particular directory - thus, resulting in better performance and of course, security level is boosted as well.
Don’t forget that you can turn off .htaccess feature as defined above, and move all .htaccess configuration lines with proper syntax to http configuration file. This is the BEST way 
Jul 05
Lightweight, secure, FAST… with full support for virtual hosting, on-the-fly output compression, large files, php, cgi, fast cgi, SSI, authentification (different types), code caches: turckmm, APC, eaccelerator and more. It’s lighttpd. We will devote a new blog section to this http daemon that will include a lot of configuration directives and manuals, tips/tricks in the future.
DC
Jul 04
Below, I have compiled a quick steps to make your Apache run faster and with better performance.
1.) When you are compiling turn off all the features and modules you do not need. The less the better.
2.) Turn off DNS logging with "HostnameLookups off" in httpd.conf file
3.) If you have .htaccess definitions, if possible, move it to httpd.conf file and turn off .htaccess lookup.
4.) If you prefer to use .htaccess, make sure you let the apache browser know that it should read it from the exact dir. For example, if you have /my/web/sites, configure httpd.conf to start looking for .htaccess only starting from /my/web/sites/ not just /my/ for example
5.) Tune MinSpareServers, MaxSpareServers, and StartServers
6.) If you are using mod_security always remember the more rules you have the less performance it is
Jul 03
Microsoft’s web server that runs on Windows server platforms and offers full Active Server Page, Microsoft Frontpage support. Starting from version 6.0 it also supports the Dynamic Systems Initiative (DSI) with process isolation and automated health monitoring.
A good server choise (actually totaly free if you have a Windows Server license) to run Windows based applications and services.
Web page: http://www.iis.net/
Jul 02
Hey folks… I was just thinking to launch a dedicated section for thttpd daemon and this is the first post in the thread that will include a lot of config and manuals about this tiny and super fast http daemon!
thttpd homepage: http://www.acme.com/software/thttpd/
so stay tuned. more GOOD stuff is coming shortly
Kev
Jul 01
Apache is a free and open source commercial grade web server software that according to Netcraft is the number
#1 server that is powering millions of web sites and growing.
Web site URL: http://www.apache.org
Ps. even this web site is hosted using Apache web server daemon!
Recent Comments