Skip to content

Instantly share code, notes, and snippets.

@vvasilev-
Last active August 29, 2015 14:15
Show Gist options
  • Save vvasilev-/159068cd5ede0401a44c to your computer and use it in GitHub Desktop.
Save vvasilev-/159068cd5ede0401a44c to your computer and use it in GitHub Desktop.
Self-Signed SSL with Apache 2.2 & Laravel on Windows

Requirements

Self-signed certificate

  • start Windows Command Prompt as Administrator
  • go to C:\OpenSSL\bin
  • follow the steps from 1 to 4 - http://www.akadia.com/services/ssh_test_certificate.html
  • copy the server.key & server.crt to <Apache2.2>/conf/ssl
  • open the httpd.conf and add Listen 443
  • enable mod_ssl in httpd.conf
  • at end of httpd.conf add this
<IfModule ssl_module>
	SSLRandomSeed startup builtin
	SSLRandomSeed connect builtin
	SSLSessionCache none
</IfModule>

Setup virtual host

<VirtualHost *:443>
    DocumentRoot "path-to-public-folder"
    ServerName yourapp.example.com
    SSLEngine On
    SSLCertificateFile conf/ssl/server.crt
    SSLCertificateKeyFile conf/ssl/server.key
</VirtualHost>

Open https://yourapp.example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment