永发信息网

nginx安装遇到问题,急求帮助

答案:2  悬赏:0  手机版
解决时间 2021-03-06 00:04
  • 提问者网友:浪荡绅士
  • 2021-03-05 01:00
[root@wm nginx-1.0.5]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-openssl=n3/openssl-1.0.0d --with-zlib=/n3/zlib-1.2.7
checking for OS
+ Linux 2.6.18-53.el5 i686
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.1.2 20070626 (Red Hat 4.1.2-14)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... not found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
........
checking for PCRE library ... found
creating objs/Makefile
Configuration summary
+ using system PCRE library
+ using OpenSSL library: n3/openssl-1.0.0d
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using zlib library: /n3/zlib-1.2.7
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
[root@wm nginx-1.0.5]# make
make -f objs/Makefile
make[1]: Entering directory `/n3/nginx-1.0.5'
cd n3/openssl-1.0.0d \
&& make clean \
&& ./config --prefix=/n3/nginx-1.0.5/n3/openssl-1.0.0d/.openssl no-shared no-threads \
&& make \
&& make install LIBDIR=lib
/bin/sh: line 0: cd: n3/openssl-1.0.0d: No such file or directory
make[1]: *** [n3/openssl-1.0.0d/.openssl/include/openssl/ssl.h] Error 1
make[1]: Leaving directory `/n3/nginx-1.0.5'
make: *** [build] Error 2
最佳答案
  • 五星知识达人网友:末日狂欢
  • 2021-03-05 01:54
/bin/sh: line 0: cd: n3/openssl-1.0.0d: No such file or directory

这条报了找不到文件或者目录。还有你这个openssl版本有点问题 现在主流的都是0.9.8 1.0.0 还没用过不知道是否稳定哎
全部回答
  • 1楼网友:十年萤火照君眠
  • 2021-03-05 03:04
一、购买证书 二、安装证书 文件说明: 1. 证书文件2140....pem,包含两段内容,请不要删除任何一段内容。 2. 如果是证书系统创建的csr,还包含:证书私钥文件2140....key。 ( 1 ) 在nginx的安装目录下创建cert目录,并且将下载的全部文件拷贝到cert目录中。如果申请证书时是自己创建的csr文件,请将对应的私钥文件放到cert目录下并且命名为2140....key; ( 2 ) 打开 nginx 安装目录下 conf 目录中的 nginx.conf 文件,找到: # https server # #server { # listen 443; # server_name localhost; # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols sslv2 sslv3 tlsv1; # ssl_ciphers all:!adh:!export56:rc4+rsa:+high:+medium:+low:+sslv2:+exp; # ssl_prefer_server_ciphers on; # location / { # # #} #} ( 3 ) 将其修改为 (以下属性中ssl开头的属性与证书配置有直接关系,其它属性请结合自己的实际情况复制或调整) : server { listen 443; server_name localhost; ssl on; root html; index index.html index.htm; ssl_certificate cert/2140....pem; ssl_certificate_key cert/2140....key; ssl_session_timeout 5m; ssl_ciphers ecdhe-rsa-aes128-gcm-sha256:ecdhe:ecdh:aes:high:!null:!anull:!md5:!adh:!rc4; ssl_protocols tlsv1 tlsv1.1 tlsv1.2; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; } } 保存退出。 ( 4 )重启 nginx。 ( 5 ) 通过 https 方式访问您的站点,测试站点证书的安装配置。如遇到证书不信任问题,请查看相关文档。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯