LOGO 首页 OA教程 ERP教程 模切知识交流 PMS教程 CRM教程 技术文档 其他文档  
 
网站管理员

[点晴永久免费OA]Nginx 配置 SSL

admin
2026年7月18日 23:16 本文热度 44

解决的漏洞

漏洞清单:

1、未对重要数据进行加密传输。

问题分析:

系统在数据传输过程中未对敏感信息(如系统管理数据、鉴别信息和重要业务数据等)进行加密处理,敏感信息以明文方式传输。


环境验证

NGINX配置ssl协议需要有--with-http_ssl_module模块,在配置前先确认nginx是否包含此模块。

1  [root@localhost web]# /web/nginx/sbin/nginx -V

2  nginx version: nginx/1.18.0

3  built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 

4  configure arguments: --prefix=/web/nginx --with-poll_module --with-http_stub_status_module

如果没有这个模块需要对nginx进行重新编译添加该模块。

重新编译

进入nginx安装源代码目录,重新编译文件,在原编译的参数上新增 --with-http_ssl_module。

编译完成后执行make参数,注意:千万别 make install ,否则就覆盖安装了, make完之后在/usr/local/nginx-1.18.0/objs目录下就多了个nginx,这个就是新版本的程序了。


1    [root@localhost web]# cd /usr/local/nginx-1.18.0/

2    [root@localhost nginx-1.18.0]# ./configure --prefix=/web/nginx --with-poll_module --with-http_stub_status_module --with-http_ssl_module --with-openssl=/usr/local/openssl-1.1.1f

3    [root@localhost nginx-1.18.0]# make

执行备份、替换、验证

备份

1  [root@localhost nginx-1.18.0]# cp /web/nginx/sbin/nginx /web/nginx/sbin/nginx1.80.bak

替换

1 [root@localhost nginx-1.18.0]# cp -rfp objs/nginx /web/nginx/sbin/nginx


验证

#校验程序配置是否正确

2

[root@localhost /]# /web/nginx/sbin/nginx -t 

nginx: the configuration file /web/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /web/nginx/conf/nginx.conf test is successful

6

#平滑重启

[root@localhost /]# /web/nginx/sbin/nginx -s reload

9

10 #查看验证

11

12 [root@localhost /]# /web/nginx/sbin/nginx -V

13 nginx version: nginx/1.18.0

14 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 

15 built with OpenSSL 1.1.1f 31 Mar 2020

16 TLS SNI support enabled

17 configure arguments: --prefix=/web/nginx --with-poll_module --with-http_stub_status_module --with-http_ssl_module --with-openssl=/usr/local/openssl-1.1.1

修改Nginx配置

增加或将原 443 server 注释去除,按照以下方式配置:

ssl_ciphers 中的算法可根据实际情况删减。

1     server {

2

3     listen       443 ssl;

4     server_name  location;

5     #ssl on;

6     ssl_certificate      server.pem;  

7     ssl_certificate_key  server.key;    

8     ssl_session_cache    shared:SSL:1m;

9     ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;

10   ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; 

11     ssl_prefer_server_ciphers on;

12

13     add_header Set-Cookie "Secure";

14 add_header Set-Cookie "HttpOnly";

15 add_header X-Frame-Options "SAMEORIGIN"; 

17     location / {

18          root  html;  

19           index  index.html index.htm;

20         }

21    }

验证测试

配置验证

1     [root@localhost /]# /web/nginx/sbin/nginx -t

2    nginx: the configuration file /web/nginx/conf/nginx.conf syntax is ok

3   nginx: configuration file /web/nginx/conf/nginx.conf test is successful

访问验证

阅读原文:点击这里


该文章在 2026/7/18 23:16:46 编辑过
关键字查询
相关文章
正在查询...
点晴ERP是一款针对中小制造业的专业生产管理软件系统,系统成熟度和易用性得到了国内大量中小企业的青睐。
点晴PMS码头管理系统主要针对港口码头集装箱与散货日常运作、调度、堆场、车队、财务费用、相关报表等业务管理,结合码头的业务特点,围绕调度、堆场作业而开发的。集技术的先进性、管理的有效性于一体,是物流码头及其他港口类企业的高效ERP管理信息系统。
点晴WMS仓储管理系统提供了货物产品管理,销售管理,采购管理,仓储管理,仓库管理,保质期管理,货位管理,库位管理,生产管理,WMS管理系统,标签打印,条形码,二维码管理,批号管理软件。
点晴免费OA是一款软件和通用服务都免费,不限功能、不限时间、不限用户的免费OA协同办公管理系统。
Copyright 2010-2026 ClickSun All Rights Reserved  粤ICP备13012886号-9  粤公网安备44030602007207号