Compile and install Nginx from source with optionnal modules.
- x86, x64, arm*
- Debian 8 and later
- Ubuntu 16.04 and later
- Latest mainline or stable version, from source
- Optional modules (see below)
- Removed useless modules
- Custom nginx.conf (default does not work)
- Init script for systemd (not provided by default)
- Logrotate conf (not provided by default)
- Image filter module / empty_gif module for Matomo Analytics
- LibreSSL from source (ChaCha20 cipher, HTTP/2 + ALPN, Curve25519, P-521)
- OpenSSL from source (ChaCha20 cipher, HTTP/2 + ALPN, Curve25519, P-521)
- ngx_pagespeed (Google performance module)
- ngx_brotli (Brotli compression algorithm)
- ngx_headers_more (Custom HTTP headers)
- ngx_http_geoip2_module with libmaxminddb and GeoLite2 databases
- Mod Security (web application firewall)
- OWASP Mod Security CSR (OWASP ModSecurity Core Rule Set)
- Cloudflare's TLS Dynamic Records Resizing patch (Optmize lantency and throughput for TLS exchanges)
- ngx_cache_purge (Purge content from FastCGI, proxy, SCGI and uWSGI caches)
- ngx-fancyindex (Fancy indexes module)
Just download and execute the script :
wget https://raw.githubusercontent.com/benhartwich/nginx-autoinstall/master/nginx-autoinstall.sh
chmod +x nginx-autoinstall.sh
./nginx-autoinstall.sh
Just select the option when running the script :
You have te choice to delete the logs and the conf.
To update Nginx, run the script and install Nginx again. It will overwrite current Nginx files and/or modules.
The update feature downloads the script from this repository, and overwrite the current nginx-autoinstall.sh
file in the working directory. This allows you to get the latest features, bug fixes, and module versions automatically.
A log file is created when running the script. It is located at /tmp/nginx-autoinstall.log
.
GPL v3.0