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

From version 35.1
edited by Kieran Kelleher
on 2008/07/21 17:59
Change comment: There is no comment for this version
To version 38.1
edited by Kieran Kelleher
on 2008/07/21 18:31
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,6 +1,6 @@
1 1  == Introduction ==
2 2  
3 -Sooner or later you will need to develop WebObjects applications that work with SSL requests over https protocol. If ssl is configured on your deployment server, you can probably just change http to https in the app entry URL and the app will probably just work over https protocol. However if your application requires security, you cannot just depend on your users typing in a URL that begins with https. Also since SSL encryption adds more load to the webserver, you may want decide that just some pages need to be returned securely over https and the rest returned via plain old http. In any case, you may want to or need to set up your local OS X development machine to support https protocol so that you can properly test your application. This article endeavors to do this in a concise way while referring to 3rd party sources where applicable. Note also that setting up ssl for testing can be a far simpler task (and not really secure) than setting up real authentic SSL certificates for use in a production server.
3 +Sooner or later you will need to develop WebObjects applications that work with SSL requests over https protocol. If ssl is configured on your deployment server, you can probably just change http to https in the app entry URL and the app will probably just work over https protocol. However if your application requires security, you cannot just depend on your users typing in a URL that begins with https. Also since SSL encryption adds more load to the webserver, you may want decide that just some pages need to be returned securely over https and the rest returned via plain old http. In any case, you may want to or need to set up your local OS X development machine to support https protocol so that you can properly test your application. Note also that setting up ssl for testing can be a far simpler task (and not really secure) than setting up real authentic SSL certificates for use in a production server.
4 4  
5 5  {{info title="Compatability"}}
6 6  
... ... @@ -77,17 +77,34 @@
77 77  
78 78  === Configure Apache2 to Use Your Development Certificates for localhost ===
79 79  
80 -Using you favorite text editor, edit the apache2 config file at
81 -/etc/apache2/httpd.conf
80 +Using your favorite command line editor, edit the apache config file at
81 +**/etc/apache2/httpd.conf**
82 82  making the changes shown in the following 2 screenshots:
83 83  
84 -[[image:step1_servernamelocalhost.jpg]]
84 +{{panel title="Setting Apache server name to localhost"}}
85 85  
86 -Next edit the ssl config file itself making the changes shown in the following sceenshot:
87 - \\
86 +!step1_servernamelocalhost.jpg!
88 88  
89 -Finally, restart apache
88 +{{/panel}}
90 90  
90 +{{panel title="Including SSL Configuration file into main Apache config file"}}
91 +
92 +!step2_includesslconfig.jpg!
93 +
94 +{{/panel}}
95 +
96 +Next edit the ssl config file itself at
97 +**/etc/apache2/extra/httpd-ssl.conf**
98 +making the changes shown in the following sceenshot:
99 +
100 +{{panel title="Setting up the SSL Config file"}}
101 +
102 +!step3_sslconfig.jpg!
103 +
104 +{{/panel}}
105 +
106 +Restart apache
107 +
91 91  {{noformat}}
92 92  
93 93  bash-3.2# apachectl graceful
... ... @@ -94,6 +94,14 @@
94 94  
95 95  {{/noformat}}
96 96  
114 +Finally, verify that https is working:
115 +
116 +{{panel title="Verify https://localhost is working"}}
117 +
118 +!httpslocalhost2.jpg!
119 +
120 +{{/panel}}
121 +
97 97  == Detecting SSL ==
98 98  
99 99  Code for detecting whether SSL is active for the current request: