Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to configure SSL WEB for CentOS7 self-generating certificates

Shulou Source: shulou.com Published: 2022-06-01 18:53:58 11月14日 Update

This article will explain in detail how to configure SSL WEB for CentOS7 self-generated certificates. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

# install Apache [root@server0 ~] # yum-y install httpd mod_ssl # add firewall rules [root@server0 ~] # firewall-cmd-- permanent-- add-server=80/tcp [root@server0 ~] # firewall-cmd-- permanent-- add-server=443/tcp [root@server0 ~] # firewall-cmd-- permanent-add-server=8080/tcp;firewall-cmd-- reload [root@server0 ~] # systemctl restart httpd Systemctl enable httpd# configure selinux security context [root@server0 ~] # semanaga port-a-t http_port_t {80memt 443 http_port_t 8080} [root@server0 ssl] # mkdir / etc/httpd/ssl Cd / etc/httpd/ssl# generate KEY [root@server0 ssl] # openssl genrsa-des3-out vqiu.cn.key 204de-password [root@server0 ssl] # openssl rsa-in vqiu.cn.key-out vqiu.cn.key# generate certificate issuance request and certificate key [root@server0 ssl] # openssl req-new-nodes-key vqiu.cn.key-out vqiu.cn.csr# generate a certificate through csr Take vqiu.cn as an example [root@server0 ssl] # openssl x509-req-days 3650-in vqiu.cn.csr-signkey vqiu.cn.key-out vqiu.cn.crt# after generating crt Csr can delete [but skip] # rm vqiu.cn.csr-f [root@server0 ssl] # cat / etc/httpd/conf.d/vqiu.cn.confListen 443 httpsServerName server0.vqiu.cnDocumentRoot / var/www/htmlSSLEngine onSSLProtocol all-SSLv2SSLCipherSuite Higg Med _ IUM _ MD5SSLCertificateFile / etc/httpd/ssl/vqiu.cn.crtSSLCertificateKeyFile / etc/httpd/ssl/vqiu.cn.key# to generate a test page [root@server0 ssl] # echo "test". > / var/www/html/index.html# restart the httpd service [root@server0 ssl] # systemctl restart httpd on "how CentOS7 generates certificates and configures SSL WEB", that's all. Hope that the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Tags: Certificates generation configuration articles autogenerated more good practical security up and down context content passwords keys articles knowledge rules firewalls pages references Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Information Apple vpn Huawei