What is nginx
nginx (pronounced "engin-x") is a Web and reverse proxy server for HTTP, SMTP, POP3 and IMAP protocols. It focuses on high concurrency, performance and low memory usage. Nginx quickly delivers static content with efficient use of system resources, also dynamic content is delivered on a network using FastCGI, SCGI handlers for scripts, uWSGI application servers or Phusion Passenger module (atm broken in funtoo, further more it can serve a very capable software load balancer. It uses an asynchronos event-driven approach to handle requests which provides more predictable performance under load, in contrast to the Apache HTTP server model, that uses a threaded or process-oriented approach to handling request. Nginx is licensed under a BSD-like license and it runs on Unix, Linux, BSD variants, Mac OS X, Solaris, AIX and Microsoft Windows.
Before you can install nginx, there are the following USE-flags available, these can be set by '/etc/portage/package.use' or '/etc/portage/package.use/nginx', depending on your setup of package.use.
- aio - Enables file AIO support
- debug - Enables extra debug codepaths, like asserts and extra output.
- http - Enable http serving
- http-cache - Enables caching for http files
- ipv6 - Enables IPv6 support
- libatomic - Use libatomic instead of buildtin atomic operations
- pcre - Enables support for Perl Compatible Regular Expressions
- ssl - Adds support for Secure Socket Layer connections
- vim-syntax - Pulls in related vim syntax scripts
Further more you can set the nginx modules you like to use in '/etc/make.conf' in the NGINX_MODULES_HTTP variable as NGINX_MODULES_HTTP="variables".
and the following mail modules as NGINX_MODULES_MAIL in '/etc/make.conf':
USE Expanded flags
nginx USE-flags go into '/etc/portage/package.use' or '/etc/portage/package.use/nginx', while the HTTP and MAIL modules go as NGINX_MODULES_HTTP or NGINX_MODULES_MAIL are stored in /etc/make.conf.