Changes for page Development-SSL requests via https protocol
Last modified by Aaron Rosenzweig on 2012/03/19 19:33
From version 27.1
edited by Kieran Kelleher
on 2008/07/21 17:29
on 2008/07/21 17:29
Change comment:
There is no comment for this version
To version 31.1
edited by Kieran Kelleher
on 2008/07/21 17:43
on 2008/07/21 17:43
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -10,10 +10,9 @@ 10 10 * If you like record and verify your OS config as follows: 11 11 ** $ openssl version 12 12 *** OpenSSL 0.9.8g 19 Oct 2007 13 -** $ httpd -v 13 +** $ httpd \-v 14 14 *** Server version: Apache/2.2.8 (Unix) 15 15 16 - 17 17 {{/info}} 18 18 19 19 == Development via Apache Webserver == ... ... @@ -24,19 +24,28 @@ 24 24 25 25 === Make the private key and SSL certificate === 26 26 27 -Normally creating SSL certificates for production use is quite involved, however since we are just doing localhost development and testing, we can bypass all the mumbo-jumbo and create the minimal unpassworded private key and SSL certificate the easy way. Do not use this method for creating production server SSL certificates !26 +Normally creating SSL certificates for production use is quite involved, however since we are just doing localhost development and testing, we can bypass all the mumbo-jumbo and create the minimal unpassworded private key and SSL certificate the easy way. Do not use this method for creating production server SSL certificates 28 28 29 - *Open terminal and ...28 +Open terminal and follow the commands shown below in my transcript which is self-explanatory if you are familiar with Terminal... 30 30 31 31 {{noformat}} 32 32 33 -$ cd /etc/apache2/ 34 -$ sudo -s 35 -# mkdir devsslcerts 36 -# cd devsslcerts/ 32 +mymac$ cd /etc/apache2/ 33 +mymac$ sudo -s 34 + 37 37 bash-3.2# mkdir devsslcerts 38 38 bash-3.2# cd devsslcerts/ 37 + 38 + 39 +{{/noformat}} 40 + 41 +Next run the one single openssl command that will make the two files we need in their final folder that we just created above. 42 +Note you will be asked for a bunch of info for the certificate. Follow what I have done below. **In particular, enter "localhost" in the Common Name field!** 43 + 44 +{{noformat}} 45 + 39 39 bash-3.2# openssl req -new -x509 -nodes -out localhost_server.crt -keyout localhost_server.key 47 + 40 40 Generating a 1024 bit RSA private key 41 41 .........................++++++ 42 42 .....++++++ ... ... @@ -56,6 +56,7 @@ 56 56 Organizational Unit Name (eg, section) []:Software Engineering Department 57 57 Common Name (eg, YOUR name) []:localhost 58 58 Email Address []:developer@webobjects.com 67 + 59 59 bash-3.2# ls -al 60 60 total 16 61 61 drwxr-xr-x 4 root wheel 136 Jul 21 16:58 . ... ... @@ -66,6 +66,22 @@ 66 66 67 67 {{/noformat}} 68 68 78 +=== Configure Apache2 to Use Your Development Certificates for localhost === 79 + 80 +Using you favorite text editor, edit the apache2 config file at 81 +/etc/apache2/httpd.conf 82 +making the changes shown in the following 2 screenshots: 83 + 84 +Next edit the ssl config file itself making the changes shown in the following sceenshot: 85 + 86 +Finally, restart apache 87 + 88 +{{noformat}} 89 + 90 +bash-3.2# apachectl graceful 91 + 92 +{{/noformat}} 93 + 69 69 == Detecting SSL == 70 70 71 71 Code for detecting whether SSL is active for the current request: