Linux环境下Apache开启https服务的方法详解

  

本文实例讲述了Linux环境下Apache开启https服务的方法。分享给大家供大家参考,具体如下:

  

首先申请SSL证书,以阿里云为例,找到域名管理:

  

癓inux环境下Apache开启https服务的方法详解"

  

免费开启SSL证书:

  

癓inux环境下Apache开启https服务的方法详解"

  

配置单域名免费证书:(有效期一年)

  

癓inux环境下Apache开启https服务的方法详解"

  

点击确定,验证证书:

  

癓inux环境下Apache开启https服务的方法详解"

  

审核成功后可以下载证书:

  

癓inux环境下Apache开启https服务的方法详解"

  

下载Apache的SSL证书:

  

癓inux环境下Apache开启https服务的方法详解"

  

解压出来这三个我放到了Apache安装目录下面

  

癓inux环境下Apache开启https服务的方法详解"

  

httpd。配置里面加这个(引入conf.d文件夹下面的全部配置):

        包括conf.d/* . conf      之前      

运行这两个:

        百胜对mod_ssl进行安装   yum安装openssl openssl-devel      之前      

找到这个文件:

  

癓inux环境下Apache开启https服务的方法详解"

  

替换全部内容:

        & lt;虚拟主机*:443比;   DocumentRoot "/var/www/html "   ServerName www.msllws.top   SSLEngine上   SSLCertificateFile/etc/httpd/cert/932538_www.msllws.top_public.crt   SSLCertificateKeyFile/etc/httpd/cert/932538_www.msllws.top.key   SSLCertificateChainFile/etc/httpd/cert/932538_www.msllws.top_chain.crt   & lt;/VirtualHost>         NameVirtualHost *: 443      之前      

然后就可以访问https了

  

希望本文所述对大家Linux服务器配置有所帮助。

Linux环境下Apache开启https服务的方法详解