Coder Social home page Coder Social logo

nginx-hda-bundle's Introduction

Nginx HDA Bundle - Dynamic Modules Power

Snap package is now available!

Snap package mainly created for use in distributions outside Ubuntu family.

Get it from the Snap Store

Add and install from PPA

PPA is located here

You can add and install any available module with:

sudo apt-add-repository ppa:hda-me/nginx-stable
sudo apt-get update
sudo apt-get install nginx nginx-module-name-you-wish

Package names: nginx, nginx-dbg, nginx-module-brotli, nginx-module-cache-purge, nginx-module-ct, nginx-module-devel-kit, nginx-module-fancyindex, nginx-module-geoip, nginx-module-geoip2, nginx-module-graphite, nginx-module-http-auth-pam, nginx-module-http-echo, nginx-module-http-headers-more, nginx-module-http-subs-filter, nginx-module-image-filter, nginx-module-lenght-hiding-filter, nginx-module-lua, nginx-module-mail, nginx-module-naxsi, nginx-module-nchan, nginx-module-njs, nginx-module-pagespeed, nginx-module-perl, nginx-module-rds-json, nginx-module-rtmp, nginx-module-session-binding-proxy, nginx-module-stream, nginx-module-stream-sts, nginx-module-sts, nginx-module-testcookie, nginx-module-ts, nginx-module-upload-progress, nginx-module-upstream-fair, nginx-module-upstream-order, nginx-module-vts, nginx-module-xslt, nginx-module-http-proxy-connect

Add the following to the top of /etc/nginx/nginx.conf (for example after pid) and reload nginx

Note: Use only modules you need to use. With dynamic modules this is pretty easy.

load_module modules/ndk_http_module.so;
load_module modules/ngx_http_geoip_module.so;
load_module modules/ngx_stream_geoip_module.so;
load_module modules/ngx_http_headers_more_filter_module.so;
load_module modules/ngx_http_image_filter_module.so;
load_module modules/ngx_http_length_hiding_filter_module.so;
load_module modules/ngx_http_lua_module.so;
load_module modules/ngx_http_naxsi_module.so;
load_module modules/ngx_http_js_module.so;
load_module modules/ngx_stream_js_module.so;
load_module modules/ngx_pagespeed.so;
load_module modules/ngx_http_perl_module.so;
load_module modules/ngx_stream_module.so;
load_module modules/ngx_mail_module.so;
load_module modules/ngx_http_rds_json_filter_module.so;
load_module modules/ngx_http_session_binding_proxy_module.so;
load_module modules/ngx_http_testcookie_access_module.so;
load_module modules/ngx_http_upstream_order_module.so;
load_module modules/ngx_http_xslt_filter_module.so;
# ngx_brotli filter module - used to compress responses on-the-fly.
load_module modules/ngx_http_brotli_filter_module.so;
# ngx_brotli static module - used to serve pre-compressed files.
# Both ngx_brotli modules could be used separately, but part of nginx-module-brotli package
load_module modules/ngx_http_brotli_static_module.so;
load_module modules/ngx_postgres_module.so;
load_module modules/ngx_nchan_module.so;
load_module modules/ngx_http_auth_pam_module.so;
load_module modules/ngx_http_echo_module.so;
load_module modules/ngx_http_upstream_fair_module.so;
load_module modules/ngx_http_cache_purge_module.so;
load_module modules/ngx_http_fancyindex_module.so;
load_module modules/ngx_http_uploadprogress_module.so;
load_module modules/ngx_http_subs_filter_module.so;
load_module modules/ngx_http_graphite_module.so;
load_module modules/ngx_http_vhost_traffic_status_module.so;
load_module modules/ngx_ssl_ct_module.so 
load_module modules/ngx_http_ssl_ct_module.so 
load_module modules/ngx_mail_ssl_ct_module.so 
load_module modules/ngx_stream_ssl_ct_module.so
load_module modules/ngx_rtmp_module.so;
load_module modules/ngx_http_ts_module.so.so;
load_module modules/ngx_http_stream_server_traffic_status_module.so;
load_module modules/ngx_stream_server_traffic_status_module.so;
load_module modules/ngx_http_geoip2_module.so;
load_module modules/ngx_stream_geoip2_module.so;
load_module modules/ngx_http_proxy_connect_module.so;

Donation

Consider making a donation, if you like what I doing.

I working remotely and income is unstable, so every little bit helps.

Also it would be nice if you provide, a note on [email protected] after making a donation with information what you like and what you want to improve. So, I would consider giving more time and support to particular project.

I also open to reasonable work offers, especially if offer would be close to a field or project I work with.

E-money & Fiat

Yandex Money

Donation on Yandex Money

Advanced Cash

Open and use [email protected] in Specify the recipient's wallet or e-mail field

PayPal

Donation with PayPal

Payeer

Donation with Payeer use P2865115 in Account, e-mail or phone number field

Cryptocurrency

Bitcoin

Address is 1N5czHaoSLukFSTq2ZJujaWGjkmBxv2dT9

Musicoin

Address is 0xf449f8c17a056e9bfbefe39637c38806246cb2c9

Ethereum

Address is 0x23459a89eAc054bdAC1c13eB5cCb39F42574C26a

Other

I could provide you with some relatively cheap "hardware" donation options directly to my PO Box, if you prefer real gifts. Ask for details on [email protected]

Modules and changes overview:

Every 3rd party module is connected as submodule to the repository. So you could check .gitmodules for module source, including exact branch. Some modules under https://github.com/cryptofuture/* are forks, and its made only when upstream doesn't accept some useful patch/pr, or when upstream is not maintained and module is patched to make it buildable as dynamic module or buildable with a newer nginx versions.

Dynamic modules

Base dynamic modules

  • http_xslt module
  • http_image_filter module
  • http_geoip module
  • http_perl module
  • ngx_mail module with xmmp patch (linked with mail_ssl)
  • ngx_stream module (linked with stream_ssl), and stream_ssl_preread since 1.11.5.

Static modules

  • http_ssl module
  • http_realip module
  • http_addition module
  • http_sub module
  • http_gunzip module
  • http_gzip_static module
  • http_random_index module
  • http_secure_link module
  • http_stub_status module
  • http_auth_request module
  • http_slice module

Modules removed: http_dav, http_flv, http_mp4

Optimizations and changes made

Check /debian/patches directly for an actual patches

FAQ

I want to add my or someone's nginx module to the PPA

Module should be dynamic!

Fast way #1: Pull request with changes, better if module will be as git submodule. Don't forget to change rules file and create install rules for module.
Fast way #2: Contact me, make donation and I would add your module ASAP
*Slower way: Create issue request with module description and link to module, and I'll do it myself in spare time.

Q: Why you switched from stable to mainline builds?

Nginx mainline builds more stable now, and its easier to receive news about new mainline release, even before source is available on nginx.org from nginx mailing list. Stable nginx versions releases became even less frequent, and a lot fixes not imported in stable version, only critical and secure fixes. Main reason I used stable version before, was lifecycle and modules support. But since most 3-rd party modules are dynamic now, is not crucial even if some module will break.

Why no TLSv1.3 support?

Even in bionic (18.04) Ubuntu ships openssl 1.1.0, and I don't want to support openssl in Ubuntu on my own, since it needs critical security updates, which I'll not be able to provide as fast as Canonical security team.

nginx-hda-bundle's People

Contributors

cryptofuture avatar jacklenox avatar seonghobae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx-hda-bundle's Issues

Load dynamic modules and enable Brotli

Hi,

I just googled and reached your git. Trying to learn backend and sysadmin. I wanted to understand if I were to load a dynamic module. I would just go ahead and uncomment the module and it gets activated, right?

Looking forward for 1.13.9 :)

PS: The Brotli compression is enabled automagically right? No need to edit the nginx conf file? I'm a little confused as I'm also seeing gzip set to 'ON' in the conf file. Could you please clarify?

Use better OpenSSL version

One of the main reasons I currently have to build nginx packages from source is that I want chacha20/poly1305 support, which requires a more recent or patched OpenSSL, such as this one. Any chance you could include that in your builds?

Looking for co-maintainers

I tried to make this work, but I'm thinking that I need someone to help (co-maintain) the repository and launchpad.

Reason: I'm very bad at distinguishing working time with a free time. And when I have a free time, I'm not in the mood to maintain repository, as I'm already tired from other work.

If a person would have any question, how to patch, and maintain it, I probably could answer.

General request: make this packaging compatible with the official nginx one

This is a great bundle, but it has a number of differences from the official nginx packages that are obstacles for anyone switching from them, for example the nginx.conf file is unnecessarily different: it lacks an include directive to load additional config from /etc/nginx/conf.d, and setting worker_processes 1; is really unhelpful. My recommendation would be to keep the config identical as far as possible, and only change what is strictly necessary to add what your packaging provides, which should be only the loadmodule directives. They could be put in an external file (instead of directly in nginx.conf) and perhaps load from the conf.d folder. This would allow seamless switching from the stock packages and back without needing to change stock config files significantly. I'm a big fan of conf.d folders because they allow you to use distro defaults for standard config files and override them with external files, so package updates can overwrite standard config files safely.

nginx 1.17.0

Hi,

nginx released version 1.17.0

When will this repository be updated?

Improve readme

I think I made Readme to technical and long. Need short readme and more human-friendly version.
Shorter readme version also should be on launchpad. Some details could hidden in the wiki.
Possibly consider add easy tip or donation way beside bitcoin.

nginx 1.13.9 released

Hello!
Can u please update to latest nginx version? This release include http2 push functionality.

this nginx version is outdated and dangerous. Got DoS attacked!

This nginx version is not up to date.
We got DoS attacked today by this http/2 issue https://news.softpedia.com/news/nginx-security-issues-expose-more-than-14-million-servers-to-dos-attacks-523659.shtml

I really loved your modularity approach but this all means nothing when we can get attacked. Really sad I loose brotli and Google pagespeed for my old sites now :(

Seems the only good way to keep nginx with features is to compile it yourself (I hate this route ... I want to install stuff not custom compile it).

502 Bad Gateway on Incognito

Hi,

I am facing a weird error where I am getting a 502 error when trying to access the website from incognito mode. I only have the following error.
[error] 13888#13888: *59205 upstream sent too big header while reading response header from upstream, client: 185.203.122.4, server: domain.com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "www.domain.com"

The website opens just fine in normal mode.

TLSv1.3 support

From docs:
The TLSv1.3 parameter (1.13.0) works only when OpenSSL 1.1.1 built with TLSv1.3 support is used.

From nginx -V
built with OpenSSL 1.0.2g 1 Mar 2016

Issue with brotli_static on;

Hi!
Many thanks for this magnific work! I have a problem with the directive:
brotli_static on;
When i push it in my nginx configuration file it throws an error:
unknown directive "brotli_static"

Another directives such as:

brotli on;
brotli_comp_level 9;

works well in the configuration file. Do you know the posible reason?

Installation Problems

I stumbled across the related PPA because of a need for the nginx-xmpp patch in a bit of an edge case. It turns out, this package doesn't specify Conflicts: or Replaces: in d/control and causes all sorts of interesting problems.

nginx should conflict with and replace nginx-{light,extras,full,common} and the modules should do the same with their debian/ubuntu counterparts.

nginx ipv6

thanks for this project and just wonder if you can add ipv6 module at your convenience, thanks in advance!

Unable to install latest nginx with modules

First of thank you for great work!! Today when I check I found that Nginx version 1.18.0-1 is available for bionic. However, if we install this then the following modules won't be installed

The following packages have unmet dependencies:
nginx-module-brotli : Depends: nginx (= 1.17.3-2-ppa7bionic)
nginx-module-cache-purge : Depends: nginx (= 1.17.3-2-ppa7
bionic)
nginx-module-http-headers-more : Depends: nginx (= 1.17.3-2-ppa7bionic)
nginx-module-pagespeed : Depends: nginx (= 1.17.3-2-ppa7
bionic)
nginx-module-upload-progress : Depends: nginx (= 1.17.3-2-ppa7~bionic)

If I install old version then following modules won't install
The following packages have unmet dependencies:
nginx-module-image-filter : Depends: nginx (= 1.18.0-1bionic)
nginx-module-xslt : Depends: nginx (= 1.18.0-1
bionic)

nginx-module-brotli depends on older nginx on Ubuntu 18.04

On Ubuntu 18.04, this PPA installs nginx 1.14.0 but nginx-module-brotli seems to depend on a older unavailable version of nginx, preventing the module from being installed. Is this intentional?

$ apt install nginx-module-brotli
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nginx-module-brotli : Depends: nginx (= 1.13.8-2-ppa7~bionic)
E: Unable to correct problems, you have held broken packages.

PPA nginx conflicts with nginx-common

Upgrading a 16.04 system with nginx already installed:

 Unpacking nginx (1.11.12-1-ppa7~xenial) over (1.10.0-0ubuntu0.16.04.4) ...

dpkg: error processing archive /var/cache/apt/archives/nginx_1.11.12-1-ppa7~xenial_amd64.deb (--unpack):
trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx-common 1.10.0-0ubuntu0.16.04.4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Obviously the issue can be fixed by uninstalling the existing nginx packages first, but if the PPA provided an upgraded nginx-common users could upgrade without warnings.

What prevents from update right now

i386 bionic and xenial build 1.15.6 fails with https://github.com/cryptofuture/lua-nginx-module, branch = graphite:
UPD: fixed

src/http -I src/http/modules -I src/http/v2 -I debian/extra/ngx_devel_kit/src -I src/mail -I src/stream \
	-o objs/addon/src/ngx_http_lua_control.o \
	debian/extra/lua-nginx-module/src/ngx_http_lua_control.c
In file included from debian/extra/lua-nginx-module/src/ngx_http_lua_control.h:12:0,
                 from debian/extra/lua-nginx-module/src/ngx_http_lua_control.c:14:
debian/extra/lua-nginx-module/src/ngx_http_lua_control.c: In function ‘ngx_http_lua_on_abort’:
debian/extra/lua-nginx-module/src/ngx_http_lua_common.h:144:61: error: left shift count >= width of type [-Werror=shift-count-overflow]
     ((void *) ((uintptr_t) (&ngx_http_lua_##ludata) & ((1UL << 47) - 1)))
                                                             ^
debian/extra/lua-nginx-module/src/ngx_http_lua_control.c:435:30: note: in expansion of macro ‘ngx_http_lua_lightudata_mask’
     lua_pushlightuserdata(L, ngx_http_lua_lightudata_mask(
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
objs/Makefile:2087: recipe for target 'objs/addon/src/ngx_http_lua_control.o' failed
make[3]: *** [objs/addon/src/ngx_http_lua_control.o] Error 1

amd64 xenial build fails with https://github.com/wburgers/Session-Binding-Proxy , branch openssl-1.1.x
UPD: fix provided upstream

src/mail -I src/stream \
	-o objs/addon/nginx_session_binding_proxy_module/ngx_http_session_binding_proxy_module.o \
	debian/extra/Session-Binding-Proxy/nginx_session_binding_proxy_module/ngx_http_session_binding_proxy_module.c
debian/extra/Session-Binding-Proxy/nginx_session_binding_proxy_module/ngx_http_session_binding_proxy_module.c: In function ‘ngx_http_session_binding_proxy_handler’:
debian/extra/Session-Binding-Proxy/nginx_session_binding_proxy_module/ngx_http_session_binding_proxy_module.c:184:21: error: implicit declaration of function ‘SSL_SESSION_get_master_key’ [-Werror=implicit-function-declaration]
    master_key.len = SSL_SESSION_get_master_key(ssl_session, master_key.data, SSL_MAX_MASTER_KEY_LENGTH);
                     ^
cc1: all warnings being treated as errors
objs/Makefile:2615: recipe for target 'objs/addon/nginx_session_binding_proxy_module/ngx_http_session_binding_proxy_module.o' failed
make[3]: *** [objs/addon/nginx_session_binding_proxy_module/ngx_http_session_binding_proxy_module.o] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>'

Source packages could be found there, I prefer to not update github repo before stabilization
https://launchpad.net/~hda-me/+archive/ubuntu/nginx-stable/+packages

Installation Fails on Ubuntu Focal Fossa

The package needs to be updated to be compatible with the latest Nginx mainline, and the latest Ubuntu - focal fossa has been out for almost 6 months now. At the moment, when adding the ppa and running subsequent apt update the user gets:

E: The repository 'http://ppa.launchpad.net/hda-me/nginx-stable/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Also, it might be worthwhile including TLSv1.3 - the latest Ubuntu ships with OpenSSL 1.1.1+ by default now.

[Debian] Missing public key

W: GPG error: http://ppa.launchpad.net/hda-me/nginx-stable/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F5EB010C5341279
E: The repository 'http://ppa.launchpad.net/hda-me/nginx-stable/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

lua-nginx module dosn't working.

nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_lua_module.so" failed (/etc/nginx/modules/ngx_http_lua_module.so: undefined symbol: ndk_set_var_value) in /etc/nginx/nginx.conf:6
nginx: configuration file /etc/nginx/nginx.conf test failed

OS: Ubuntu 16.04 xenial
Linux helper 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 GNU/Linux

ngx_http_brotli_filter_module broken in 1.13.8-1-ppa7~xenial?

I just updated to 1.13.8-1-ppa7~xenial and noticed that broti compression of dynamic content via seems to no longer work, e.g. requests for such resources time out in the browser. The static brotli module seems fine on the other hand.

Relevant config parts:

load_module modules/ngx_http_brotli_filter_module.so;
server {
  brotli on;
  brotli_types text/plain text/css application/javascript application/json;
  location / {
    proxy_pass http://127.0.0.1:5000;
  }
}

error.log shows this error:

2018/01/12 11:33:52 [alert] 3458#3458: worker process 3463 exited on signal 9
2018/01/12 11:33:52 [alert] 3458#3458: worker process 3465 exited on signal 9
2018/01/12 11:34:07 [alert] 3472#3472: worker process 3480 exited on signal 9

please add nginx-rtmp-module

Hi, this is a very nice repo and ppa, I like it - thank you very much for your efforts!

It would be great if you would like to add nginx-rtmp-module - that would be a very valuable addition to this ppa!

Thanks and have a nice day!

disabling TLS v1.0

With TLS v1.0 being phased out by the end of the month. I am not quite sure how I would disable that. Tried searching high and low but didn't find any result. The conf file doesn't have any mention of TLS v1.0. Can you advise?

nginx 1.15.11

Need to cover update this week or this is taking too long...

nginx 1.17.1

Hi,

nginx released version 1.17.1

When will this repository be updated?

Nginx brotli update

Hi there.

First of all thank you for your awesome work.

May i suggest to switch ngx_brotli location from google/ngx_brotli which is not supported anymore. To switch to fork from one of libbrotli maintainers https://github.com/eustas/ngx_brotli (also google guy)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.