Nginx On CentOS 7: Which One For Production?
Hi,
I’m currently fiddling with Nginx to get acquainted with its various quirks and idiosyncrasies.
I have a public CentOS 7 sandbox server, and I’ve tried various setups. Install the binary from EPEL, install various binaries from SCLo, build from source.
I wonder which version is recommended for production use on CentOS 7. Any suggestions?
Cheers & happy Christmas holidays,
Niki
—
Microlinux – Solutions informatiques durables
7, place de l’église – 30730 Montpezat Site : https://www.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32
Mob. : 06 51 80 12 12
4 thoughts on - Nginx On CentOS 7: Which One For Production?
I suggest using the upstream package. Instructions can be found here:
https://nginx.org/en/linux_packages.html#RHEL-CentOS
There’s some conflicting information about how to set up your virtual servers in /etc in various blogs. Look at the official documentation to see their recommended setup. Most of your customization goes in
/etc/nginx/conf.d.
https://nginx.org/en/docs/
Le 26/12/2019 à 18:44, Kenneth Porter a écrit :
OK
A few weeks ago I bought an online video course about Nginx on Udemy, and I really enjoyed it. (Disclaimer: I’m not affiliated in any way)
At this point I’m already vaguely familiar with setting up Nginx. I was only a little confused about which binary version to choose.
Cheers,
Niki
—
Microlinux – Solutions informatiques durables
7, place de l’église – 30730 Montpezat Site : https://www.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32
Mob. : 06 51 80 12 12
–I was a bit confused when first setting it up, and I wanted to make sure that others who found my reply in the archives learned about the conflicts in blog HOWTOs. Some were suggesting putting the virtual servers in sites-available, which is a Debian convention that imitates their Apache layout.
<https://serverfault.com/questions/527630/what-is-the-different-usages-for-sites-available-vs-the-conf-d-directory-for-ngi>
It all depends on your needs. The nginx repo has 1.16.1, EPEL currently has nginx 1.16.1 as well but could lag depending on the package maintainer. My take is that the upstream repo will be the most up to date, but the EPEL
repo might be the most “correct” or tested on RHEL/CentOS.