{"id":13493417,"url":"https://github.com/angristan/nginx-autoinstall","last_synced_at":"2025-04-14T23:19:41.622Z","repository":{"id":6984500,"uuid":"54280872","full_name":"angristan/nginx-autoinstall","owner":"angristan","description":"Compile NGINX from source with custom modules and patches on Debian and Ubuntu","archived":false,"fork":false,"pushed_at":"2025-02-01T07:08:42.000Z","size":361,"stargazers_count":641,"open_issues_count":39,"forks_count":236,"subscribers_count":50,"default_branch":"master","last_synced_at":"2025-04-14T23:19:23.237Z","etag":null,"topics":["alpn","brotli","chacha20-poly1305","cloudflare","curve25519","debian","geoip","http2","libressl","nginx","openssl","pagespeed","waf"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angristan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"stanislas","liberapay":"stanislas","ko_fi":"stanislas","github":"angristan","custom":"https://coindrop.to/stanislas"}},"created_at":"2016-03-19T18:25:24.000Z","updated_at":"2025-04-12T08:50:03.000Z","dependencies_parsed_at":"2025-02-12T04:15:18.063Z","dependency_job_id":null,"html_url":"https://github.com/angristan/nginx-autoinstall","commit_stats":{"total_commits":424,"total_committers":35,"mean_commits":"12.114285714285714","dds":0.570754716981132,"last_synced_commit":"b5049c0fe820883d6073264f17d3807ebf0d6b10"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angristan%2Fnginx-autoinstall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angristan%2Fnginx-autoinstall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angristan%2Fnginx-autoinstall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angristan%2Fnginx-autoinstall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angristan","download_url":"https://codeload.github.com/angristan/nginx-autoinstall/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975330,"owners_count":21192210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpn","brotli","chacha20-poly1305","cloudflare","curve25519","debian","geoip","http2","libressl","nginx","openssl","pagespeed","waf"],"created_at":"2024-07-31T19:01:15.024Z","updated_at":"2025-04-14T23:19:41.583Z","avatar_url":"https://github.com/angristan.png","language":"Shell","funding_links":["https://patreon.com/stanislas","https://liberapay.com/stanislas","https://ko-fi.com/stanislas","https://github.com/sponsors/angristan","https://coindrop.to/stanislas"],"categories":["Shell","Tools"],"sub_categories":["Lua Modules"],"readme":"# nginx-autoinstall\n\nCompile and install NGINX from source with optional features, modules and patches.\n\n## Compatibility\n\n- Debian 9 and later\n- Ubuntu 16.04 and later\n\nThe script might work on ARM-based architectures, but it's only being regularly tested against x86_64 with [GitHub Actions](https://github.com/angristan/nginx-autoinstall/actions/workflows/build.yml).\n\n## Features\n\n- Latest mainline or stable version, from source\n- Optional modules and patches\n- [Custom nginx.conf](https://github.com/angristan/nginx-autoinstall/blob/master/conf/nginx.conf) (default does not work)\n- [Init script for systemd](https://github.com/angristan/nginx-autoinstall/blob/master/conf/nginx.service) (not provided by default)\n- [Logrotate conf](https://github.com/angristan/nginx-autoinstall/blob/master/conf/nginx-logrotate) (not provided by default)\n- Block Nginx installation from APT using pinning, to prevent conflicts\n\n### Optional modules/features\n\n- [LibreSSL from source](http://www.libressl.org/) (CHACHA20, ALPN for HTTP/2, X25519, P-521)\n- [OpenSSL from source](https://www.openssl.org/) (TLS 1.3, CHACHA20, ALPN for HTTP/2, X25519, P-521)\n- [Cloudflare's patch for HTTP/3](https://blog.cloudflare.com/experiment-with-http-3-using-nginx-and-quiche/) with [Quiche](https://github.com/cloudflare/quiche) and [BoringSSL](https://github.com/google/boringssl).\n- [Cloudflare's TLS Dynamic Record Resizing patch](https://blog.cloudflare.com/optimizing-tls-over-tcp-to-reduce-latency/) maintained by [nginx-modules](https://github.com/nginx-modules/ngx_http_tls_dyn_size).\n- [Cloudflare's HTTP/2 HPACK encoding patch](https://blog.cloudflare.com/hpack-the-silent-killer-feature-of-http-2/) ([original patch](https://github.com/cloudflare/sslconfig/blob/master/patches/nginx_1.13.1_http2_hpack.patch), [fixed patch](https://github.com/hakasenyang/openssl-patch/blob/master/nginx_hpack_push_1.15.3.patch))\n- [ngx_pagespeed](https://github.com/pagespeed/ngx_pagespeed): Google performance module\n- [ngx_brotli](https://github.com/google/ngx_brotli): Brotli compression algorithm\n- [ngx_headers_more](https://github.com/openresty/headers-more-nginx-module): Custom HTTP headers\n- [ngx_http_geoip2_module](https://github.com/leev/ngx_http_geoip2_module) with [libmaxminddb](https://github.com/maxmind/libmaxminddb) and [GeoLite2 databases](https://dev.maxmind.com/geoip/geoip2/geolite2/) ⚠️ Requires license key\n- [ngx_cache_purge](https://github.com/FRiCKLE/ngx_cache_purge): Purge content from FastCGI, proxy, SCGI and uWSGI caches\n- [ngx-fancyindex](https://github.com/aperezdc/ngx-fancyindex) : fancy file listings\n- [nginx-dav-ext-module](https://github.com/arut/nginx-dav-ext-module): WebDAV PROPFIND, OPTIONS, LOCK, UNLOCK support)\n- [nginx-module-vts](https://github.com/vozlt/nginx-module-vts): Nginx virtual host traffic status module ([install instructions](https://github.com/vozlt/nginx-module-vts#installation))\n- [ModSecurity-nginx](https://github.com/SpiderLabs/ModSecurity-nginx): connector for the [ModSecurity](https://github.com/SpiderLabs/ModSecurity) open-source web application firewall (WAF)\n- [testcookie-nginx-module](https://github.com/kyprizel/testcookie-nginx-module): simple robot mitigation module using cookie based challenge/response ([example config](https://github.com/kyprizel/testcookie-nginx-module#example-configuration))\n- [lua-nginx-module](https://github.com/openresty/lua-nginx-module): extend NGINX with Lua. Using [luajit2](https://github.com/openresty/luajit2) (OpenResty's maintained branch of LuaJIT) and [ngx_devel_kit](https://github.com/simplresty/ngx_devel_kit) (Nginx Development Kit (NDK))\n- [nginx_substitutions_filter](https://github.com/yaoweibin/ngx_http_substitutions_filter_module): regular expression and fixed string substitutions for nginx\n- [RTMP module](https://github.com/arut/nginx-rtmp-module) (NGINX-based Media Streaming Server)\n- [nginx-ultimate-bad-bot-blocker](https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker): Bad Bot and User-Agent Blocker, Spam Referrer Blocker, Anti DDOS, Bad IP Blocker and Wordpress Theme Detector Blocker\n\n#### Cache Modules\n\n- [redis2-nginx-module](https://github.com/openresty/redis2-nginx-module) : Nginx upstream module for the Redis 2.0 protocol\n- [ngx_http_redis](https://www.nginx.com/resources/wiki/modules/redis/) : The nginx HTTP redis module for caching with redis\n- [srcache-nginx-module](https://github.com/openresty/srcache-nginx-module) : Transparent subrequest-based caching layout for arbitrary nginx locations\n- [set-misc-nginx-module](https://github.com/openresty/set-misc-nginx-module) : Various set_xxx directives added to nginx's rewrite module (md5/sha1, sql/json quoting, and many more)\n- [echo-nginx-module](https://github.com/openresty/echo-nginx-module) : Brings \"echo\", \"sleep\", \"time\", \"exec\" and more shell-style goodies to Nginx config file.\n  - Required to set up [Redis with conditional purging](https://easyengine.io/wordpress-nginx/tutorials/single-site/redis_cache-with-conditional-purging/)\n  - Install Redis with ```apt install redis-{tools,server}```\n\n## Usage\n\nJust download and execute the script :\n\n```sh\nwget https://raw.githubusercontent.com/angristan/nginx-autoinstall/master/nginx-autoinstall.sh\nchmod +x nginx-autoinstall.sh\n./nginx-autoinstall.sh\n```\n\nYou will be able to:\n\n- Install NGINX\n- Update NGINX (It will install it again and overwrite current files and/or modules.)\n- Uninstall NGINX with optional cleanup\n- Self-update the script\n\nJust follow the question!\n\nYou can check [configuration examples](https://github.com/angristan/nginx-autoinstall/tree/master/conf) for the custom modules.\n\n## Headless use\n\nYou can run the script without the prompts with the option `HEADLESS` set to `y`. This allows for automated install and scripting. This is what is used to test the script with [GitHub Actions](https://github.com/angristan/nginx-autoinstall/actions/workflows/build.yml).\n\n```sh\nHEADLESS=y ./nginx-autoinstall.sh\n```\n\nTo install Nginx mainline with Brotli:\n\n```sh\nHEADLESS=y \\\nNGINX_VER=MAINLINE \\\nBROTLI=y \\\n./nginx-autoinstall.sh\n```\n\nTo install with Geoip:\n\n```sh\nHEADLESS=y \\\nGEOIP=y \\\nGEOIP2_ACCOUNT_ID=YOUR_ACCOUNT_ID_HERE \\\nGEOIP2_LICENSE_KEY=YOUR_LICENSE_KEY_HERE \\\n./nginx-autoinstall.sh\n```\n\nTo uninstall Nginx and remove the logs and configuration files:\n\n```sh\nHEADLESS=y \\\nOPTION=2 \\\nRM_CONF=y \\\nRM_LOGS=y \\\n./nginx-autoinstall.sh\n```\n\nAll the default variables are set at the beginning of the script.\n\n## LICENSE\n\nGPL v3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangristan%2Fnginx-autoinstall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangristan%2Fnginx-autoinstall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangristan%2Fnginx-autoinstall/lists"}