0

I was asked to install SSL on XAMPP 5.5.38 while being given some .pem files.

To my understanding, these files are the certificates. Problem is, I have no solid idea how to use these files for installation. How do I approach this? Should I convert it to .crt files first? I was told that .pem files could be used in xampp but I'm not entirely sure myself. Thanks.

Mayank Patel
  • 3,868
  • 10
  • 36
  • 59

1 Answers1

0

See Does .pem file contains both private and public keys? for details about PEM file.

Provided that the PEM file you got contains both public certificate and private key (you can confirm by checking its content), you can use the same file for both SSLCertificateFile and SSLCertificateKeyFile and it should work.

josephting
  • 2,617
  • 2
  • 30
  • 36
  • only files I got are cert.pem , chain.pem,, fullchain.pem and privkey.pem – mrkenalano Apr 08 '19 at 01:41
  • @mrkenalano Then you already have the files separated. `SSLCertificateFile` is a cert, `SSLCertificateKeyFile` is a private key. Only these 2 are required. You don't have to convert them into .crt or .key. It should work fine with .pem file too. – josephting Apr 08 '19 at 01:47
  • Sorry for the late reply. Still couldn't install the .pem files that I have. This is making me nuts lol. – mrkenalano Apr 10 '19 at 00:07
  • @mrkenalano Does your first line of `cert.pem` says `BEGIN CERTIFICATE` and `privkey.pem` says `BEGIN PRIVATE KEY` or `BEGIN RSA PRIVATE KEY`? Are there any other sections within these 2 files? – josephting Apr 10 '19 at 00:42
  • Yes. They begin with the things that you said. And some other numbers and letters inside the ----BEGIN CERTIFICATE---- and ----BEGIN PRIVATE KEY----. Sorry if I'm somewhat being of a hassle. I am not experienced enough to know these kinds of stuff. Thank you so much for taking the time to respond to my questions. – mrkenalano Apr 10 '19 at 01:28
  • @mrkenalano Then it should work. Unless the way you configured your config file for apache server was incorrect which is difficult to help with without further information. – josephting Apr 10 '19 at 01:33