Nginx编译安装sslrewrite
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Nginx编译安装sslrewrite相关的知识,希望对你有一定的参考价值。
一、安装环境
nginx下载地址:nginx
zlib下载页面:zlib
pcre下载页面:pcre
二、编译安装:
#useradd nginx -s /sbin/nologin
#yum install gcc-c++ -y
#./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module --user=nginx --group=nginx --with-pcre=/opt/pcre-8.42 --with-zlib=/opt/zlib-1.2.11 --with-http_geoip_module --with-http_gzip_static_module --with-http_flv_module --with-http_mp4_module
#make && make install
三、启动脚本(/lib/systemd/system/nginx.service)
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
四、启动服务:
systemctl enable nginx
systemctl start nginx
systemctl reload nginx
systemctl restart nginx
以上是关于Nginx编译安装sslrewrite的主要内容,如果未能解决你的问题,请参考以下文章