Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx.conf: add streams #33

Merged
merged 1 commit into from Nov 14, 2019
Merged

nginx.conf: add streams #33

merged 1 commit into from Nov 14, 2019

Conversation

aparcar
Copy link
Contributor

@aparcar aparcar commented Nov 9, 2019

This patch adds the possibility to add stream config files in
/etc/nginx/stream.d/.

Starting with nginx 1.9 is is possible to proxy non-http streams to
backend service, more details in the offical docs0.

This is usefull when you have a non-http service running but still want
to secure the connection via ssl.

Signed-off-by: Paul Spooren mail@aparcar.org

This patch adds the possibility to add stream config files in
/etc/nginx/stream.d/.

Starting with nginx 1.9 is is possible to proxy non-http streams to
backend service, more details in the offical docs[0].

This is usefull when you have a non-http service running but still want
to secure the connection via ssl.

[0]: https://nginx.org/en/docs/stream/ngx_stream_core_module.html

Signed-off-by: Paul Spooren <mail@aparcar.org>
@umputun
Copy link
Collaborator

umputun commented Nov 9, 2019

I'm not sure why this should be in the default configuration, especially as a non-default module according to the linked documentation - "This module is not built by default, it should be enabled with the --with-stream configuration parameter."

If some users need a different nginx.conf they can provide it without a need to alter the included one, just by mapping it via docker-compose volume.

@aparcar
Copy link
Contributor Author

aparcar commented Nov 10, 2019

Hi @umputun,
I checked the preinstalled modules in your docker container and it comes with stream enabled (see --with-stream):

/ # nginx -V
nginx version: nginx/1.16.1
built by gcc 8.3.0 (Alpine 8.3.0) 
built with OpenSSL 1.1.1c  28 May 2019 (running with OpenSSL 1.1.1d  10 Sep 2019)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/va
r/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var
/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --with-perl_modules_path=/usr/lib/perl5/vendor_perl --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_au
th_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with
-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_p
reread_module --with-cc-opt='-Os -fomit-frame-pointer' --with-ld-opt=-Wl,--as-needed

Apart from that, you figured out this really nice nginx.conf with all these ssl_ciphers I don't know nothing about, so instead of keeping my own version of this updated, I'd rather stick to yours.

@umputun umputun merged commit 49bcf30 into nginx-le:master Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants