赞
踩
参考:https://blog.csdn.net/ygqygq2/article/details/77479765
1)确认安装pcre和openssl(不知道是否有用,但是装了不出错)
yum install -y pcre openssl
2) git获取ssl module(这个和参考不一样,可能地址变了。)
git clone https://github.com/yaoweibin/nginx_upstream_check_module.git
3)编译
./configure --with-http_stub_status_module --with-stream=dynamic --with-stream_ssl_module --with-pcre --with-http_ssl_module --add-module=../nginx_upstream_check_module
make
make install
4)改配置
[root@msg6 nginx]# cat /usr/local/nginx/conf/nginx.conf
#user www;
worker_processes 8;
error_log logs/info.log info;
#pid logs/nginx.pid;
load_module modules/ngx_stream_module.so; # 此处要添加模块
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
#设定请求缓冲
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 300m;
#sendfile on;
tcp_nopush on;
#keepalive_timeout 60;
tcp_nodelay on;
server_tokens off;
client_body_buffer_size 512k;
proxy_connect_timeout 20;
proxy_send_timeout 60;
proxy_read_timeout 20;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
gzip on;#开启gzip,节省带宽
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain text/css application/x-javascript image/bmp application/javascript;
output_buffers 1 32k;
postpone_output 1460;
limit_rate_after 3m;#限速模块,前3M下载时不限速
limit_rate 512k; #限速模块
include vhost/*.conf;
}
stream {
include stream/*.conf;
}
5)修改客户端的mail配置
cat /etc/mail.rc
……省略前面
set from=xxx@126.com
# 登陆邮箱的账号,如linuxidc@126.com
set smtp=172.41.xx.xx
# 邮箱的smtp服务器,如smtp.126.com ,这里是内网地址
set smtp-auth-user=xxx@126.com
# 邮箱的用户名,比如linuxidc@126.com
set smtp-auth-password=xxxx
# 邮件的密码
set smtp-auth=login
# 认证方式:登陆
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。