nginx源码编译http_ssl_module安装失败

nginx源码编译http_ssl_module安装失败

我正在尝试使用 certbot 设置我的 https,因此我需要重新编译 ngx 并添加“--with-http_ssl_module”,下面是完整步骤:

 - sudo make clean  sudo  
 - ./auto/configure --prefix=/var/www/html
   --sbin-path=/usr/sbin/nginx --conf- path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log
       --error-log-path=/var/log/nginx/error.log --with-pcre --with-http_ssl_module  --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --modules-path=/etc/nginx/modules 
 - check Makefile , I can see 'http_ssl_module' added in objs/Makefile
 - ./auto/configure sudo make sudo make install

完成上述所有步骤后(未发现错误),我检查了“ngx_modules.o”(仍然缺少 ssl 模块)并运行以下命令

sudo certbot --nginx -d feedme.pub 
Saving debug log to /var/log/letsencrypt/letsencrypt.log 
The nginx plugin is not working; there may be problems with your existing configuration. 
The error was: PluginError('Nginx build is missing SSL module (--with-http_ssl_module).') 

另外,我检查了我的 ssl 库 - libssl 是否已安装:

ldconfig -p | grep libssl
    libssl3.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl3.so
    libssl.so.1.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
    libssl.so.1.0.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
    libssl.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl.so

谁能帮忙回答为什么我无法构建“--with-http_ssl_module”?

相关内容