I tried to enable https on my development web. After changing the virtualhost, apache won't start.
Log:
[Mon Dec 26 08:32:41.917835 2016] [ssl:warn] [pid 1100:tid 392] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Mon Dec 26 08:32:41.980237 2016] [ssl:emerg] [pid 1100:tid 392] AH02562: Failed to configure certificate vid:443:0 (with chain), check C:/xampp/apache/conf/ssl.crt/certnew.cer [Mon Dec 26 08:32:41.980237 2016] [ssl:emerg] [pid 1100:tid 392] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: TRUSTED CERTIFICATE) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile? [Mon Dec 26 08:32:41.980237 2016] [ssl:emerg] [pid 1100:tid 392] SSL Library Error: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib AH00016: Configuration Failed
Here are the code(httpd-vhosts.conf):
# vid
<VirtualHost vid:443>
SSLEngine on
SSLCertificateFile "C:\xampp\apache\conf\ssl.crt\certnew.cer"
SSLCertificateKeyFile "C:\xampp\apache\conf\ssl.key\server.key"
<Directory "C:\xampp\htdocs">
AllowOverride All
</Directory>
ServerAdmin [email protected]
DocumentRoot "C:\xampp\htdocs"
ServerName vid
</VirtualHost>