Last modified by Aaron Rosenzweig on 2012/03/19 19:33

From version 30.1
edited by Kieran Kelleher
on 2008/07/21 17:43
Change comment: There is no comment for this version
To version 28.1
edited by Kieran Kelleher
on 2008/07/21 14:59
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -4,14 +4,12 @@
4 4  
5 5  {{info title="Compatability"}}
6 6  
7 -These instructions were written and tested on the following, but should work on any 10.5.X config or later
7 +These instructions were written and tested on
8 8  * OS X Leopard Client 10.5.4
9 9  * Standard built-in apache2
10 10  * If you like record and verify your OS config as follows:
11 11  ** $ openssl version
12 -*** OpenSSL 0.9.8g 19 Oct 2007
13 -** $ httpd \-v
14 -*** Server version: Apache/2.2.8 (Unix)
12 +***
15 15  
16 16  {{/info}}
17 17  
... ... @@ -19,78 +19,8 @@
19 19  
20 20  By default, WebObjects development installations typically run via DirectConnect. For https development, we must run thru the apache webserver built in to every OS X machine. So before going any further, configure your WebObjects development environment so that your development application launches and [[runs thru apache>>Development Tools-Running Through Apache]] using the host name "localhost".
21 21  
22 -== Configuring Apache for [[https://localhost]] ==
20 +== Configuring Apache for https:~/~/localhost ==
23 23  
24 -=== Make the private key and SSL certificate ===
25 -
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
27 -
28 -Open terminal and follow the commands shown below in my transcript which is self-explanatory if you are familiar with Terminal...
29 -
30 -{{noformat}}
31 -
32 -mymac$ cd /etc/apache2/
33 -mymac$ sudo -s
34 -
35 -bash-3.2# mkdir devsslcerts
36 -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 -
46 -bash-3.2# openssl req -new -x509 -nodes -out localhost_server.crt -keyout localhost_server.key
47 -
48 -Generating a 1024 bit RSA private key
49 -.........................++++++
50 -.....++++++
51 -writing new private key to 'localhost_server.key'
52 ------
53 -You are about to be asked to enter information that will be incorporated
54 -into your certificate request.
55 -What you are about to enter is what is called a Distinguished Name or a DN.
56 -There are quite a few fields but you can leave some blank
57 -For some fields there will be a default value,
58 -If you enter '.', the field will be left blank.
59 ------
60 -Country Name (2 letter code) [AU]:US
61 -State or Province Name (full name) [Some-State]:Florida
62 -Locality Name (eg, city) []:Tampa
63 -Organization Name (eg, company) [Internet Widgits Pty Ltd]:Five WebObjects Sailors, Inc.
64 -Organizational Unit Name (eg, section) []:Software Engineering Department
65 -Common Name (eg, YOUR name) []:localhost
66 -Email Address []:developer@webobjects.com
67 -
68 -bash-3.2# ls -al
69 -total 16
70 -drwxr-xr-x 4 root wheel 136 Jul 21 16:58 .
71 -drwxr-xr-x 10 root wheel 340 Jul 21 16:56 ..
72 --rw-r--r-- 1 root wheel 1497 Jul 21 16:58 localhost_server.crt
73 --rw-r--r-- 1 root wheel 887 Jul 21 16:58 localhost_server.key
74 -
75 -
76 -{{/noformat}}
77 -
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 -
94 94  == Detecting SSL ==
95 95  
96 96  Code for detecting whether SSL is active for the current request: