Nginx

Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Written by Igor Sysoev from 2002 and released to the public in 2004, Nginx now hosts more than 10% of all domains worldwide. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption.

Installation
This article assumes the reader has a basic understanding of what Use Flags are and how to use them. Nginx allows for extra modules to be built in, such as imap & pop3. The complete list is: (11/16/12)

For Example:

Finally, emerging Nginx:

Make sure everything looks correct before proceeding.

Configuring
All of the configuration files reside inside
 * - Parameters passed on to FastCGI
 * - List all known mime types that will be handled
 * - Main configuration file

After reading through the stock, setting up a static file http server should self-explanatory. If PHP is needed, read on.

Run Nginx
Start Nginx

After editing any config files, reload Nginx

Add Nginx to the default run level

Install PHP with FPM Support
PHP5 now has a built-in FastCGI Process Manager (FPM). Since php is needed, and the built-in fpm is pretty good, it is recommended for primary use.

Add the needed use flag

Re-compile PHP5 with the new use flag

Configure PHP-FPM
Change the values as needed; use the comments as your guide.

Start PHP-FPM

Add PHP-FPM to the default run level