Karena ada banyak VPS dan variasi distro pun stack terinstall kadang saya lupa secara spesifik fitur yang membedakan masing – masingnya. Jadi pas mbak Shafira cerita Nginxnya di CentOS 7 yang tak support ALPN awalnya ragu waktu iya. ? Soalnya di stack LEMP CentOS 7 saya dapat ALPN. Hehe. ? Ternyata saking lamanya saya menginstall Nginx di VPS itu saya lupa awal mula instalasinya ialah compile dari sourcecode karena masalah yang sama. Hehe. ?
Akhirnya saya sedikit bertualang di Google, waktu ga ada yang bikin repositorynya. Sebelumnya saya pikir EPEL dan IUS ada, tapi dari baca – baca tampaknya masih gunakan OpenSSL sebelum 1.0.2 yang tempat tinggal masih gunakan NPN pun. Bukan solusi.
Tetapi ternyata ada yang merancang repositorynya dengan nama nginx-more. Harap maklum saya kukuh cari aplikasi repo karena supaya gampang maintenancenya, karena telah dibuktikan sendiri kalau compile from source kedepannya bakal lupa. ?
Bagusnya lagi nginx-more ini terdapat bagi kedua edisi CentOS terakhir:
- CentOS 6
yum install https://repo.aerisnetwork.com/stable/centos/6/x86_64/aeris-release-1.0-4.el6.noarch.rpm
- CentOS 7
yum install https://repo.aerisnetwork.com/stable/centos/7/x86_64/aeris-release-1.0-4.el7.noarch.rpm
Kalau telah tinggal install saja
yum install nginx-more
Lokasi konfigurasinya ada di /etc/nginx/
dan contoh konfigurasi virtual hostnya ada di /etc/nginx/conf.d/
.
Dan ini versi Nginx yang diinstall nantinya:
nginx -V
nginx version: nginx/1.10.2
kembangkan build maintained by karljohnson.it@gmail.com
built by gcc 5.2.1 20150902 (Red Hat 5.2.1-2) (GCC)
built with OpenSSL 1.0.2j 26 Sep 2016
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/cache/client_body --http-proxy-temp-path=/var/lib/nginx/cache/proxy --http-fastcgi-temp-path=/var/lib/nginx/cache/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/cache/uwsgi --http-scgi-temp-path=/var/lib/nginx/cache/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_image_filter_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_geoip_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-threads --with-stream --with-stream_ssl_module --with-http_slice_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --with-cc=/opt/rh/devtoolset-4/root/usr/bin/gcc --with-openssl-opt=enable-tlsext --with-openssl=modules/openssl-1.0.2j --add-module=modules/modsecurity-2.9.1/nginx/modsecurity --add-module=modules/headers-more-nginx-module-0.32 --add-module=modules/ngx_cache_purge-2.3 --add-module=modules/nginx-module-vts-0.1.10 --add-module=modules/ngx_pagespeed-1.11.33.4-stable
Dalam rentang waktu saya test drive tak ada masalah berarti dan sama persis seperti Nginx biasanya.
Malah fiturnya lebih komplit dibanding instalasi standar:
- Nginx is compiled using latest GCC from RedHat devtoolset-4
- Nginx is compiled using latest available OpenSSL sources
- Optimized configurations included (WordPress anti-bruteforce, Laravel)
- PageSpeed module included and configured
- ModSecurity module included but unconfigured
- Nginx virtual host traffic status module included and configured
- Headers-More-Nginx included
- Nginx-Cache-Purge included
- GeoIP included only for CentOS 7
Bagaimana? Tertarik? ?
Sumber https://servernesia.com