Vendredi 23 novembre 2018

Nginx- Erreur compilation OpensSSL

Problème de compilation nginx avec Openssl 1.1
Il faut compiler avec la version 1.0 qui est toujours d’actualité.
Voir le site https://github.com/openssl/openssl/releases
Version OpenSSL_1_0_2l du 25 mai 2017

sudo -s
cd /usr/src
wget https://github.com/openssl/openssl/archive/OpenSSL_1_0_2l.tar.gz
tar xvf OpenSSL_1_0_2l.tar.gz
exit

Il faut modifier le batch de compilation,ajouter --with-openssl=/usr/src/openssl-OpenSSL_1_0_2l

cd /usr/src/nginx-custom/nginx-mainline
#Configuration , compilation et installation nginx
./configure \
 --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' \
 --with-ld-opt=-Wl,-z,relro \
 --prefix=/usr/share/nginx \
 --conf-path=/etc/nginx/nginx.conf \
 --http-log-path=/var/log/nginx/access.log \
 --error-log-path=/var/log/nginx/error.log \
 --lock-path=/var/lock/nginx.lock \
 --pid-path=/run/nginx.pid \
 --http-client-body-temp-path=/var/lib/nginx/body \
 --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
 --http-proxy-temp-path=/var/lib/nginx/proxy \
 --http-scgi-temp-path=/var/lib/nginx/scgi \
 --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
 --with-debug \
 --with-pcre-jit \
 --with-ipv6 \
 --with-http_ssl_module \
 --with-http_v2_module \
 --with-http_stub_status_module \
 --with-http_realip_module \
 --with-http_auth_request_module \
 --with-http_addition_module \
 --with-http_dav_module \
 --with-http_flv_module \
 --with-http_geoip_module \
 --with-http_gzip_static_module \
 --with-http_image_filter_module \
 --with-http_mp4_module \
 --with-http_perl_module \
 --with-http_random_index_module \
 --with-http_secure_link_module \
 --with-http_sub_module \
 --with-http_xslt_module \
 --with-mail \
 --with-mail_ssl_module \
 --with-openssl=/usr/src/openssl-OpenSSL_1_0_2l \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/headers-more-nginx-module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/ngx_http_auth_pam_module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/ngx_cache_purge \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/ngx_devel_kit \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/echo-nginx-module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/ngx-fancyindex \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/nginx-push-stream-module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/lua-nginx-module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/nginx-upload-progress-module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/ngx_http_substitutions_filter_module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/encrypted-session-nginx-module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/set-misc-nginx-module \
 --add-module=/usr/src/nginx-custom/nginx-mainline/modules/nginx-upstream-fair

#compilation
make
#installation
make install
#Copier le binaire pour le PATH
cp /usr/share/nginx/sbin/nginx /usr/sbin/
#Effacement compilation
make clean
#Dossier temporaire
mkdir /var/lib/nginx
#Dossier config
mkdir /etc/nginx/conf.d/
#dossier vhost
mkdir /var/www

debian@olibox:~$ apt search php7 Sorting… Done Full Text Search… Done libapache2-mod-php7.0/stable 7.0.19-1 armhf server-side, HTML-embedded scripting language (Apache 2 module)

libphp7.0-embed/stable 7.0.19-1 armhf HTML-embedded scripting language (Embedded SAPI library)

php-symfony-polyfill-php70/stable 1.2.0-1 all Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions

php7.0/stable 7.0.19-1 all server-side, HTML-embedded scripting language (metapackage)

php7.0-bcmath/stable 7.0.19-1 armhf Bcmath module for PHP

php7.0-bz2/stable 7.0.19-1 armhf bzip2 module for PHP

php7.0-cgi/stable 7.0.19-1 armhf server-side, HTML-embedded scripting language (CGI binary)

php7.0-cli/stable 7.0.19-1 armhf command-line interpreter for the PHP scripting language

php7.0-common/stable 7.0.19-1 armhf documentation, examples and common module for PHP

php7.0-curl/stable 7.0.19-1 armhf CURL module for PHP

php7.0-dba/stable 7.0.19-1 armhf DBA module for PHP

php7.0-dev/stable 7.0.19-1 armhf Files for PHP7.0 module development

php7.0-enchant/stable 7.0.19-1 armhf Enchant module for PHP

php7.0-fpm/stable 7.0.19-1 armhf server-side, HTML-embedded scripting language (FPM-CGI binary)

php7.0-gd/stable 7.0.19-1 armhf GD module for PHP

php7.0-gmp/stable 7.0.19-1 armhf GMP module for PHP

php7.0-imap/stable 7.0.19-1 armhf IMAP module for PHP

php7.0-interbase/stable 7.0.19-1 armhf Interbase module for PHP

php7.0-intl/stable 7.0.19-1 armhf Internationalisation module for PHP

php7.0-json/stable 7.0.19-1 armhf JSON module for PHP

php7.0-ldap/stable 7.0.19-1 armhf LDAP module for PHP

php7.0-mbstring/stable 7.0.19-1 armhf MBSTRING module for PHP

php7.0-mcrypt/stable 7.0.19-1 armhf libmcrypt module for PHP

php7.0-mysql/stable 7.0.19-1 armhf MySQL module for PHP

php7.0-odbc/stable 7.0.19-1 armhf ODBC module for PHP

php7.0-opcache/stable 7.0.19-1 armhf Zend OpCache module for PHP

php7.0-pgsql/stable 7.0.19-1 armhf PostgreSQL module for PHP

php7.0-phpdbg/stable 7.0.19-1 armhf server-side, HTML-embedded scripting language (PHPDBG binary)

php7.0-pspell/stable 7.0.19-1 armhf pspell module for PHP

php7.0-readline/stable 7.0.19-1 armhf readline module for PHP

php7.0-recode/stable 7.0.19-1 armhf recode module for PHP

php7.0-snmp/stable 7.0.19-1 armhf SNMP module for PHP

php7.0-soap/stable 7.0.19-1 armhf SOAP module for PHP

php7.0-sqlite3/stable 7.0.19-1 armhf SQLite3 module for PHP

php7.0-sybase/stable 7.0.19-1 armhf Sybase module for PHP

php7.0-tidy/stable 7.0.19-1 armhf tidy module for PHP

php7.0-xml/stable 7.0.19-1 armhf DOM, SimpleXML, WDDX, XML, and XSL module for PHP

php7.0-xmlrpc/stable 7.0.19-1 armhf XMLRPC-EPI module for PHP

php7.0-xsl/stable 7.0.19-1 all XSL module for PHP (dummy)

php7.0-zip/stable 7.0.19-1 armhf Zip module for PHP

php7cc/stable 1.1.0-1 armhf command line tool to detect PHP 7 incompatible code