2

When you create a self-signed certificate (or even if one from Lets Encrypt) they ask for host-name, i'm using apache as a web-server on Localhost/ xampp

So what should I put on domain name? 'localhost' doesn't work??? I don't understand.. i just want https:// localhost TO WORK?!! I'm a beginner so please..

I've tried different forms like localhost, localhost:8080 (cause i changed the port) but nothing seems to work.. I understand im not the only one who uses localhost but seriously? I don't understand how to get a certificate for LOCALHOST and secure the connection?

Abigal
  • 39
  • 1
  • 6

2 Answers2

0

You can use this answer to create a CA and localhost certificate to install to your web server.

Community
  • 1
  • 1
Oleg
  • 726
  • 5
  • 11
  • if i already have a certificate, is it possible for me to use it? – Abigal May 28 '17 at 11:01
  • You certificate should contain localhost/DNS name in subject CN or SAN fields. If it is rejected by the HTTPS client due to lack of these fields - you will need to regenerate it. – Oleg May 29 '17 at 20:47
  • 1
    CN is localhost. The certificate is issued by localhost to localhost. I've tried everything from few of the answers that you mentioned on your reply but none seems to work. I don't know what I am missing.. does it somehow have to do with the port? as the 80 port is used by skype, i have to type https://localhost:8080 (it doest work with https, just wanted to mention the port it listens to) – Abigal May 30 '17 at 23:27
-2

On Windows, you can use this application http://www.itiverba.com/en/software/itisscg.php to easly create any self-signed certificate on Windows.

For the domain name you can use "localhost" or the name of your computer (See in "Device name" or "Computer Name" in Windows's System Properties).

On your Apache server:

  • Copy the certificate files to your server.
  • Edit the file httpd.conf: Configure the <VirtualHost> block for the SSL-enabled site.
  • Restart Apache.
clemens
  • 16,716
  • 11
  • 50
  • 65
Steph
  • 70
  • 2
  • At the moment: _Website unavailable. This site is currently suspended. The site administrator has been informed._ – AntonK Apr 12 '19 at 16:41