Generate Apache Development Server SSL Key


/ Published in: Apache
Save to your folder(s)

Creates a self-signed SSL Key for use on a Windows development server. Instructions: http://dpaste.com/237670/


Copy this code and paste it in your HTML
  1. :: Generates a new server key file for a development server
  2.  
  3. ECHO OFF
  4.  
  5. TITLE Creating a Development Server Key
  6.  
  7. ECHO Creating a Development Server Key...
  8.  
  9. :: Generate server.key
  10. openssl genrsa -des3 -out server.key 1024
  11.  
  12. :: Generate server.csr and server.pem
  13. openssl req -config ../conf/openssl.cnf -new -out server.csr -keyout server.pem
  14.  
  15. :: Regenerate server.key from created server.pem
  16. openssl rsa -in server.pem -out server.key
  17.  
  18. :: Signs the key file and outputs server.cert
  19. openssl x509 -in server.csr -out server.cert -req -signkey server.key -days 365
  20.  
  21. :: Copy generated files to 'ssl' folder
  22. ECHO Copying generated files to 'SSL' folder
  23. copy "server.key" "../ssl/server.key"
  24. copy "server.cert" "../ssl/server.cert"
  25. copy "server.csr" "../ssl/server.csr"
  26. copy "server.pem" "../ssl/server.pem"
  27.  
  28. ECHO Development Server Key Created and Copied to SSL folder
  29.  
  30. pause

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.