美文网首页
Zabbix-Web启用安全链接ssl

Zabbix-Web启用安全链接ssl

作者: Kim9501 | 来源:发表于2019-05-12 17:09 被阅读0次

Zabbix-Web启用安全链接ssl

前端设置

  1. 安装mod_ssl
    sudo yum install mod_ssl -y
  2. 创建ssl-keys
# mkdir for private key
sudo mkdir -p /etc/httpd/ssl/private
# change mod 700
sudo chmod 700 /etc/httpd/ssl/private
# create ssl key
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/private/zabbix-web.key -out /etc/httpd/ssl/zabbix-web.crt
  1. 配置Apache ssl
cd /etc/httpd/conf.d/ && sudo cp ssl.conf ssl.conf.old
sudo vi ssl.conf
# change 
SSLCertificateFile /etc/httpd/ssl/zabbix-web.crt
SSLCertificateKeyFile /etc/httpd/ssl/private/zabbix-web.key
# restart apache service
sudo systemctl restart httpd

启用ssl

cd /etc/httpd/conf && sudo cp httpd.conf httpd.conf.old
# add replace server_address use your server_name
<VirtualHost *:*>
    ServerName server_address
    Redirect permanent / http://server_address
</VirtualHost>
# restart apache service
sudo systemctl restart httpd

禁用显示Web服务器信息

sudo vi /etc/httpd/conf/httpd.conf
# add
ServerSignature Off
ServerTokens Prod

添加防火墙策略

如果启用了防火墙,还需要同时开放80和443端口号
firewall-cmd --zone=public --add-rich-rule='rule family=ipv4 source address=192.168.0.1/24 port port=443 protocol=tcp accept' --permanent

使用https打开web

我们使用的是自己创建的密钥和证书,未经过证书机构,打开的时候会提示Your connection is not private,点击继续访问即可

tip_unsafe
ssl_web

相关文章

网友评论

      本文标题:Zabbix-Web启用安全链接ssl

      本文链接:https://www.haomeiwen.com/subject/ozgpoqtx.html