Linux Nginx 配置 SSL 证书支持 HTTPS 访问(参考)
2021-03-07 09:29
标签:temp ast nginx安装 isa ble start logs http 安装 由于之前(Linux nginx安装与配置(参考))已经安装好了 nginx 所以要重新下载包编译 ssl 2.下载 nginx 3.尝试编译 ssl 这里如果出现以下错误说明未安装 openssl,需要先安装(第四步)再重新执行第三步编译 出现以下内容则编译成功 4.安装 openssl(出现上述错误执行) 5.编译通过执行 make,不要进行 make install,否则就是覆盖安装 6.备份已经安装好的 nginx 7.将编译好的 nginx 覆盖原有的 nginx 8.启动 nginx 9.访问已配置好的 https 页面查看 Linux Nginx 配置 SSL 证书支持 HTTPS 访问(参考) 标签:temp ast nginx安装 isa ble start logs http 安装 原文地址:https://www.cnblogs.com/chendongbky/p/12887747.html
1.停止运行 nginxsystemcrl stop nginx.service
cd /home/download
wget http://nginx.org/download/nginx-1.4.4.tar.gz
tar -xvf nginx-1.4.4.tar.gz
cd nginx-1.4.4
./configure --prefix=/home/nginx --with-http_stub_status_module --with-http_ssl_module
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library
+ jemalloc library is disabled
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 dso module path: "/usr/local/nginx/modules/"
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"
yum -y install openssl openssl-devel
make
cp /home/nginx/sbin/nginx /home/nginx/sbin/nginx.bak
cp /home/download/nginx-1.4.4/objs/nginx /home/nginx/sbin/
systemcrl start nginx.service
文章标题:Linux Nginx 配置 SSL 证书支持 HTTPS 访问(参考)
文章链接:http://soscw.com/index.php/essay/61282.html