Compile the latest nginx release from source with EasyEngine


#64

thanks a lot .


#65

Download the updated version, then run the newly downloaded script. :slight_smile:


#66

Could this cause conflicts if EE is updated in the future? Either small releases that don’t update the NGINX version or if they decide to include the latest NGINX version themselves? Thanks


#67

At the moment, nginx-ee package will not receive new updates because EE v4 will use Docker.
But in case of updates, the only issue can be the usage of directives like brotli on; if the new nginx package isn’t built with the same additional modules. That’s why I have added the following lines in my script :

apt-mark hold nginx-ee nginx-common 

This way upgrades with apt-get are blocked and you will be able to check your nginx configuration compatiblity with the new package before installing it


#68

Your bash script is :heart: I was wondering if you have any planning on integrating the following ones:

  1. TLS 1.3 Draft 23 Support
  2. Cloudflare HTTP/2 Hpack Header Compression Patch
  3. Pairing Nginx with Cloudflare’s Zlib (According to Centinmod, it improves Gzip performance by 29%)

The latest Centinmod beta has these all but EasyEngine is :heart: and I just can’t think about going elsewhere. So, I was wondering if you have plans to implement this in the upcoming versions of your bash script :slight_smile:


#69

Quite true, I have used centinmod on many projects but EE is EE :smiley: Easy and Efficient.


#70

Hello @nschopra, yes I will update my bash script as soon as possible with the last TLS 1.3 draft (I was waiting for more informations because there was some compatibility issues with TLS 1.3 draft 20).
I have already managed to compile Nginx with Cloudflare HTTP/2 Hpack Header Compression Patch, and I will add it to my bash script in the next release.
I will take a look on the Centminmod thread about pairing Nginx with Cloudflare’s Zlib.


#71

@virtubox Thanks for the script and work!


#72

@virtubox Thank you so much for this script. It really helps me! One thing which I noticed is…when I’m downloading Pagespeed it gets stuck (I was waiting for 1h 30min and nothing has changed) :confused:

Small update: when you hit ENTER button it finishes downloading Pagespeed and completes Nginx compilation process.

pagespeed2


#73

Thanks again for v1.13.11.


#74

Hi. I’m on Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-1054-aws x86_64) with last version of EE and I can’t install it.

Following your advice:

sudo bash <(wget -O - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh)
--2018-04-13 07:47:38--  https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
HTTP request sent, awaiting response... bash: /proc/self/fd/11: No such file or directory
 ubuntu@ip-XXX-XXX-XXX-XXX  ~  200 OK
Length: 9753 (9.5K) [text/plain]
Saving to: 'STDOUT'

-                                0%[                                                    ]       0  --.-KB/s    in 0s


Cannot write to '-' (Success).

Downloading and executing sh file:

sudo sh nginx-build.sh
Welcome to the nginx-ee bash script.
Do you want Ngx_Pagespeed ? (y/n)
y
Do you want NAXSI WAF (still experimental)? (y/n)
y
-ne        Installing dependencies               [..]
-ne        Installing dependencies                [OK]
-ne
-ne        Downloading additionals modules        [..]
-ne        Downloading additionals modules        [OK]
-ne
-ne        Downloading brotli                     [..]
-ne        Downloading brotli                     [OK]
-ne
-ne        Downloading openssl                    [..]
-ne        Downloading openssl                    [OK]
-ne
-ne        Downloading naxsi                      [..]
-ne        Downloading naxsi                      [OK]
-ne
nginx-build.sh: 174: nginx-build.sh: Syntax error: "(" unexpected

Thank you in advance.


#75

Hello, you have to be logged in as root to launch the script, because some redirections are not working with sudo.


#76

Thank you.

I’ve managed to go further to “compile nginx”, but after 30’, it has failed:

objs/Makefile:2255: recipe for target 'objs/addon/src/ngx_pagespeed.o' failed
make[1]: *** [objs/addon/src/ngx_pagespeed.o] Error 4
make[1]: Leaving directory '/usr/local/src/nginx'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
make -f objs/Makefile install
make[1]: Entering directory '/usr/local/src/nginx'
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -Wno-deprecated-declarations  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/ngx_devel_kit/objs -I objs/addon/ndk -I /usr/local/src/openssl/.openssl/include -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I /usr/local/src/ngx_devel_kit/src -I /usr/local/src/ngx_devel_kit/src -I /usr/local/src/ngx_devel_kit/objs -I objs/addon/ndk -I /usr/local/src/ngx_brotli/deps/brotli/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/google-sparsehash/gen/arch/linux/x64/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/apr/gen/arch/linux/x64/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/aprutil/gen/arch/linux/x64/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/url \
	-o objs/addon/src/ngx_rewrite_driver_factory.o \
	/usr/local/src/incubator-pagespeed-ngx-latest-beta/src/ngx_rewrite_driver_factory.cc
cc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.

objs/Makefile:2262: recipe for target 'objs/addon/src/ngx_rewrite_driver_factory.o' failed
make[1]: *** [objs/addon/src/ngx_rewrite_driver_factory.o] Error 4
make[1]: Leaving directory '/usr/local/src/nginx'
Makefile:11: recipe for target 'install' failed
make: *** [install] Error 2

Thank you for your help.


#77

Login as root and download the script again :

sudo su - root
wget https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh

make the script executable and then launch it :

chmod +x nginx-build.sh
./nginx-build.sh

#78

I’ve followed your instructions, but it has failed another time.

1  bash <(wget -O - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh)
2  wget https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh
3  chmod +x nginx-build.sh
4  ./nginx-build.sh
5  cat /tmp/nginx-ee.log

Here is the last part of the log:

objs/Makefile:2255: recipe for target 'objs/addon/src/ngx_pagespeed.o' failed
make[1]: *** [objs/addon/src/ngx_pagespeed.o] Error 4
make[1]: Leaving directory '/usr/local/src/nginx'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
make -f objs/Makefile install
make[1]: Entering directory '/usr/local/src/nginx'
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -Wno-deprecated-declarations  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/ngx_devel_kit/objs -I objs/addon/ndk -I /usr/local/src/openssl/.openssl/include -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I /usr/local/src/ngx_devel_kit/src -I /usr/local/src/ngx_devel_kit/src -I /usr/local/src/ngx_devel_kit/objs -I objs/addon/ndk -I /usr/local/src/ngx_brotli/deps/brotli/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/google-sparsehash/gen/arch/linux/x64/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/apr/gen/arch/linux/x64/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/third_party/aprutil/gen/arch/linux/x64/include -I /usr/local/src/incubator-pagespeed-ngx-latest-beta/psol/include/url \
	-o objs/addon/src/ngx_rewrite_driver_factory.o \
	/usr/local/src/incubator-pagespeed-ngx-latest-beta/src/ngx_rewrite_driver_factory.cc
cc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.

objs/Makefile:2262: recipe for target 'objs/addon/src/ngx_rewrite_driver_factory.o' failed
make[1]: *** [objs/addon/src/ngx_rewrite_driver_factory.o] Error 4
make[1]: Leaving directory '/usr/local/src/nginx'
Makefile:11: recipe for target 'install' failed

Thank you.


#79

How much total RAM and available disk space on your server?


#80

1 GB RAM available. 400 MB free on average. 22 GB free on disk:

Filesystem      Size  Used Avail Use% Mounted on
udev            488M     0  488M   0% /dev
tmpfs           100M   12M   88M  12% /run
/dev/xvda1       30G  7.7G   22G  27% /

Thank you for your help.


#81

I’ve tried after quitting maria-db and it worked. Thank you and many thanks to @virtubox


#82

@virtubox I was wondering if you have plans to add TLS 1.3 Draft 23 & Cloudflare Headers Compression Patch to the bash script in upcoming days. Just can’t wait for the good stuff :slight_smile:


#83

Hello @nschopra, about TLS 1.3 Draft 23, I will probably wait for the next openssl release, because draft 28 was already published and there are breaking changes with draft 23. So at the moment, it’s not possible to use TLS 1.3 with the most part of web browser because there are too many drafts.

I’m already working on the Cloudflare Headers Compression Patch.