Já abri um problema no GitHub no repositório NGINX ( https://github.com/nginx/nginx/issues/189 ) e gostaria de ter certeza novamente se isso foi intencional ou não.
Quero compilar o nginx com o openssl, que eu mesmo tive que compilar com sucesso. No entanto, quando eu digito “make” para o nginx, sempre recebo este erro:
cd /opt/nginx-1.26.2 \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config --prefix=/opt/nginx-1.26.2/.openssl no-shared no-threads \
&& make \
&& make install_sw LIBDIR=lib
make[2]: Entering directory '/opt/nginx-1.26.2'
rm -rf Makefile objs
make[2]: Leaving directory '/opt/nginx-1.26.2'
/bin/sh: line 3: ./config: No such file or directory
make[1]: *** [objs/Makefile:1641: /opt/nginx-1.26.2/.openssl/include/openssl/ssl.h] Error 127
make[1]: Leaving directory '/opt/nginx-1.26.2'
make: *** [Makefile:10: build] Error 2
bash-5.1# ./config
bash: ./config: No such file or directory
Comando Configurar:
./configure --conf-path=/etc/nginx/nginx.conf --modules-path=/etc/nginx/modules/ --add-module=/opt/ModSecurity-nginx --with-http_ssl_module --with-http_auth_request_module --with-http_v2_module --with-http_v3_module --with-http_realip_module --with-http_gunzip_module --with-openssl=/opt/nginx-1.26.2
--with-openssl=/opt/nginx-1.26.2
provavelmente está errado.O nginx espera uma árvore de fontes openssl para esta opção. Embora isso possa ser localizado em
/opt/nginx-1.26.2
seria um nome estranho para fontes openssl../config: No such file or directory
refere-se ao script de configuração do openssl, veja por exemplo https://github.com/openssl/openssl/blob/master/configComo não está presente no seu diretório, provavelmente não é o diretório de origem do openssl.
Baixe os fontes do OpenSSL, descompacte-os em algum lugar, depois aponte
--with-openssl=/your/path/to/openssl/
e o script de configuração do OpenSSL, além de todos os outros fontes do OpenSSL, devem existir naquele diretório.