and access the page on any device your network connected. This is very handy in cases like "you have to test HTML5 GeoLocation API in a mobile, and Chrome restricts the API in secure connections only".
选择新复制的证书,双击它(本地主机证书)。在Certificate模式中,单击Details选项卡,然后单击Copy to File...按钮。
这将弹出导出向导,我选择导出私钥,单击下一步。我还选择Export all extended properties(同样,我不确定这是否有必要)。我选择使用一个简单的密码(pass)和默认加密。
选择要导出到的文件夹并命名该文件。如果需要,您总是可以移动和重命名该文件。为了简单起见,让我们将其复制到Apache安装下的conf文件夹(在我的例子中:C:\apache\conf),并将文件命名为myCert(结果文件将是.pfx文件)
< p > 5。改变DocumentRoot -
将DocumentRoot从默认值更改为文件所在的目录
< p > 5 b。改变ServerName -
将ServerName从默认值(类似www.example.com:443)更改为localhost:443
< p > 5 c。改变SSLCertificateFile < br >
将SSLCertificateFile从默认值(${SRVROOT}/conf/server.crt)更改为${SRVROOT}/conf/EntrustCert.pem
< p > 5 c。改变SSLCertificateKeyFile < br >
将SSLCertificateKeyFile从默认值(${SRVROOT}/conf/server.key)更改为${SRVROOT}/conf/private.pem
所有这些都在<VirtualHost _default_:443>标记中。
# General setup for the virtual host
DocumentRoot "${SRVROOT}/htdocs/MYSITE"
ServerName localhost:443
ServerAdmin admin@example.com
ErrorLog "${SRVROOT}/logs/error.log"
TransferLog "${SRVROOT}/logs/access.log"
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
# Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. Keep
# in mind that if you have both an RSA and a DSA certificate you
# can configure both in parallel (to also allow the use of DSA
# ciphers, etc.)
# Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
# require an ECC certificate which can also be configured in
# parallel.
SSLCertificateFile "${SRVROOT}/conf/EntrustCert.pem"
#SSLCertificateFile "${SRVROOT}/conf/server-dsa.crt"
#SSLCertificateFile "${SRVROOT}/conf/server-ecc.crt"
# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you've both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
# ECC keys, when in use, can also be configured in parallel
SSLCertificateKeyFile "${SRVROOT}/conf/private.pem"
#SSLCertificateKeyFile "${SRVROOT}/conf/server-dsa.key"
#SSLCertificateKeyFile "${SRVROOT}/conf/server-ecc.key"