I am going to reinstall nginx on a fresh Ubuntu 16 server. E5 with 132 GB of ram. I looked at a script called compile-nginx-from-source.sh over at githubgist by user nmrony. Looks great and made for Ubuntu 16. What are your thoughts on some of the most necessary nginx modules to install?
Asked
Active
Viewed 1,477 times
0
-
Generally I would install from the Ubuntu repository unless you really need a module not included. If your website is slow there are other things you can do, such as page caching, use a CDN, database optimisation, etc. What problems are you having? – Tim Jul 07 '18 at 00:05
-
I am not having any issues. Every 2 years I reinstall the os and reinstall all applications to the latest. Every 6 years I exchange the hardware. – Vituvo Jul 07 '18 at 00:28
-
There's no problem here then. Install the standard Nginx distribution and software, and if it's working fine then don't bother doing anything. If it's not working right, is slow, etc, then you can ask a question if you need help :) – Tim Jul 07 '18 at 09:51
1 Answers
1
Install only the modules you use.
nginx supports dynamic module since 1.9.11. Use that so you don't need to recompile nginx every time you need to add modules.
Every resources not used by unnecessary modules can be used on other important things, e.g. file cache, Memcache/Redis, PHP-FPM, ramfs, PostgreSQL, etc.
Using E5 and 132GB of RAM only for nginx is a bit overkill, especially if your traffic is low. I suggest you to virtualize or compartmentalize your applications; LXC/LXD is only a snap
away in Ubuntu >= 16.04.

mforsetti
- 2,666
- 2
- 16
- 20
-
I'm happy I asked and also thankful for your reply. I have some research to do but this definitely placed me on the right path. – Vituvo Jul 08 '18 at 05:27
-
One of the reasons I wanted to compile from source is to remove the broadcast of nginx in nginx/src/http/ngx_http_header_filter_module.c . – Vituvo Jul 08 '18 at 23:32
-
Rather than recompiling, use [OpenResty's ngx_headers_more](https://github.com/openresty/headers-more-nginx-module#readme) to unset or modify the `Server:` header; although the existence of `Server:` header is not a high threat per se. – mforsetti Jul 09 '18 at 07:02
-
I have found that trying to set the server header with ngx_headers_more doesn't work – Jamie Lindsey Feb 09 '19 at 17:40