2
2
20strannik082018-11-17 08:28:14
Nginx
20strannik08, 2018-11-17 08:28:14

How to correctly build nginx with http2 in ubuntu 16.04?

Can you guys tell me what am I doing wrong?
Installed nginx-core and nginx-common

Downloaded nginx-1.15.6 and compiled with the following parameters:

--sbin-path=/usr/local/sbin 
--conf-path=/etc/nginx/nginx.conf 
--error-log-path=/var/log/nginx/error.log 
--http-log-path=/var/log/nginx/access.log 
--pid-path=/var/run/nginx.pid 
--with-http_gzip_static_module 
--with-http_v2_module 
--with-http_ssl_module


However, when starting from http2 in lisen, it writes a start error. Although when checking nginx-t writes that there are no errors. /var/log/nginx/error.log writes:
[emerg] 18924#0: invalid parameter "http2" in /etc/nginx/conf.d/www.conf:17


Hints that nginx did not understand what they want from it ...

PS
[email protected]:~# nginx -v
nginx version: nginx/1.15.6
[email protected]:~# openssl version
OpenSSL 1.1.0h  27 Mar 2018 (Library: OpenSSL 1.1.1  11 Sep 2018)
[email protected]:~#nginx -V
nginx version: nginx/1.15.6
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4) 
built with OpenSSL 1.1.1  11 Sep 2018
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/sbin --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --with-http_gzip_static_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-debug

Answer the question

In order to leave comments, you need to log in

2 answer(s)
2
20strannik08, 2018-11-17
@20strannik08

Okay, I figured it out myself. Cant in --sbin-path=/usr/local/sbin, it's not necessary to put it there, demolished everything that was related to nginx there, set --sbin-path=/usr/sbin/nginx and it all worked!

B
Boris Syomov, 2018-11-17
@kotomyava

And why these body movements, if there are ready-made packages from developers ( https://nginx.org/ru/linux_packages.html)?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question