At first, I used the classic allrounder, the Apache2-webserver. But since its memory footprint isn’t the smallest, especially with all the modules I use (like mod_deflate, mod_jk, mod_proxy, mod_php, mod_rewrite, mod_ssl, etc), a service like MetaScroll generates quite a load on the machine, even with very few users. This is because of many requests being proxied over the service, so that only one search generates at least three requests on the server, not counting the suggestions.
The solution I chose was the use of the lightweight nginx-webserver. It isn’t as full-featured and modular as the Apache, but it comes with everything I need and a lot more performance while using only a percentage of Apache’s memory.
You can find the relevant settings I use below.
Nginx
-
Gzip compression
gzip on;
gzip_http_version 1.0;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_buffers 16 8k; -
Turn off server tokens
server_name_in_redirect off;
server_tokens off; -
Various TCP-settings
sendfile on;
tcp_nopush on;
tcp_nodelay off;
keepalive_timeout 10;