SSL on localhost?

Hi, is it possible to use SSL on localhost for testing? If so could someone point to configuration steps. If not how is something like this done, would you have to actually have access to a server with these layers to test? Thanks

I admit I don’t know how to do this, but I’m pretty sure you can set it up locally. For example, I have a copy of MAMP Pro for Mac, which has the facility for setting up SSL locally—as a part of your local server environment.

(Sorry for a not-so-useful answer, but thought I might as well say something in lieu of a better reply. :slight_smile: )

SSL should of came with your Apache package. Also, there are a few things you have to do before you actually can use SSL on your localhost. Go into your httpd.conf file. Make sure the lines that say Include conf/extra/httpd-ssl.conf isn’t commented out. You need to include the SSL file. Once you are done with that, you just need to basically copy the lines from <VirtualHost _default_:443> to </VirtualHost>. Change the settings for that copy to your desired domain. After you are done with that, restart your Apache and it should work.

Also, make sure the folder /conf/ssl has these 6 files.

  1. server.crt
  2. server.key
  3. serverone.crt
  4. serverone.key
  5. servertwo.crt
  6. servertwo.key

If they don’t then you need to properly create those certificates. SSL won’t start without those files.

1 Like

puphpet.com can be used to create a vm that supports https.

1 Like

Sorry for a not-so-useful answer

Taking the time to help me consider what might be possible is a nice enough gesture.

SSL should of came with your Apache package. Also there …

Your instruction is super helpful, thanks I already knew how to do part of this from working previously with virtual hosts, your advice made it all make a ton of sense plus gave me the terms to search to learn more.

puphpet.com

This is also some great info. Thanks to all of you as usual this forum is a wealth of good advice.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.