zoukankan      html  css  js  c++  java
  • http-ssl自签证书

    yum install mod_ssl

    mkdir -p /etc/httpd/ssl/private
    chmod 700 /etc/httpd/ssl/private

    openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/private/apache-selfsigned.key -out /etc/httpd/ssl/apache-selfsigned.crt
    Country Name (2 letter code) [XX]:
    State or Province Name (full name) []:
    Locality Name (eg, city) [Default City]:
    Organization Name (eg, company) [Default Company Ltd]:
    Organizational Unit Name (eg, section) []:
    Common Name (eg, your name or your server's hostname) []:example.com
    Email Address []:
    vim /etc/httpd/conf.d/ssl.conf
    DocumentRoot "/usr/share/zabbix"
    ServerName example.com:443
    SSLCertificateFile /etc/httpd/ssl/apache-selfsigned.crt
    SSLCertificateKeyFile /etc/httpd/ssl/private/apache-selfsigned.key

    vim /etc/httpd/conf/httpd.conf
    #Add lines

      <VirtualHost *:*>
          ServerName example.com
          Redirect permanent / http://example.com
      </VirtualHost>
    

    systemctl restart httpd.service

    ******************************人因为有理想、梦想而变得伟大,而真正伟大就是不断努力实现理想、梦想*****************************
  • 相关阅读:
    centos6和centos7网卡修改
    centos7.4编译安装LNMP
    centos7yum安装LNMP
    jira搭建
    centos6.9编译安装LNMP
    监控命令命令
    linux设置命令历史的时间戳
    zabbix3.0安装
    Mysql(centos7) 主从搭建
    Android 利用剪切板(clipboardManager )实现数据传递
  • 原文地址:https://www.cnblogs.com/cloudLi/p/13502696.html
Copyright © 2011-2022 走看看