Nginx is a high performance webserver used as a replacement for Apache, which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache.
Nginx uses an asynchronous event-driven approach, rather than threads, to handle requests. Nginx's modular event-driven architecture can provide more predictable performance under high loads.
HTTP proxy and Web server features (adopted to DirectAdmin's implementation)
- Ability to handle more than 10,000 simultaneous connections with a low memory footprint (~2.5 MB per 10k inactive HTTP keep-alive connections)
- Handling of static files, index files and auto-indexing
- Reverse proxy with caching
- TLS/SSL with SNI and OCSP stapling support, via OpenSSL
- FastCGI support with caching
- Name- and IP address-based virtual servers
- WebSockets, which can act as a reverse proxy and perform load balancing of WebSocket applications
- HTTP/1.1 Upgrade (101 Switching Protocols), HTTP/2 protocol support
- URL rewriting and redirection via custom configuration
How to install NGINX
The higher performance will come at the cost of a slightly reduced feature set. Nginx requires CustomBuild 2.0 and for the PHP mode to be PHP-FPM.
To install Nginx (with PHP-FPM):
./build set webserver nginx ./build set php1_mode php-fpm ./build update ./build nginx ./build php ./build rewrite_confs
How to install ModSecurity
Use the same guide as is used for Apache.