首页 > 代码库 > Appserv 配置ssl证书

Appserv 配置ssl证书

 

一:打开httpd.conf文件,移除注释的行:

Include conf/extra/httpd-ahssl.conf

LoadModule ssl_module modules/mod_ssl.so

ServerName localhost:80

 

 

 

 二:放置SSl证书

技术分享

选择Apache

技术分享

划掉的是域名,将其crt和key放入和httpd.conf同级目录下的ssl文件夹中,并且改为server.crt和server.key

 

二:打开httpd-ahssl.conf(在httpd.conf同级目录下的extra文件夹中),修改如下:

<VirtualHost _default_:443>

  SSLEngine on

  ServerName localhost:443              #主要修改一下这里

  SSLCertificateFile "${SRVROOT}/conf/ssl/server.crt"

  SSLCertificateKeyFile "${SRVROOT}/conf/ssl/server.key"

  DocumentRoot "C:/AppServ/www"

# DocumentRoot access handled globally in httpd.conf

    CustomLog "${SRVROOT}/logs/ssl_request.log" \

          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

    <Directory "C:/AppServ/www">

        Options Indexes Includes FollowSymLinks

        AllowOverride All

    Require all granted

    </Directory>

  </virtualhost>

 

 

重启apache

Appserv 配置ssl证书