Last modified by Aaron Rosenzweig on 2011/05/09 01:46

From version 70.1
edited by Pascal Robert
on 2011/05/09 01:46
Change comment: There is no comment for this version
To version 71.1
edited by Pascal Robert
on 2011/05/09 01:46
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,36 +1,32 @@
1 -If you are accessing your application with URLs that look like [[http://localhost:45437/cgi-bin/WebObjects/AppName.woa/]] (with the xxx:portnum instead of xxxx/-portnum) ... then you are using the [[Evil Direct Connect>>WO:Development-Direct Connect]]. See that [[page>>WO:Development-Direct Connect]] for why you don't want to be using Direct Connect. See this page for how to stop.
1 +If you are accessing your application with URLs that look like [[http:~~/~~/localhost:45437/cgi-bin/WebObjects/AppName.woa/>>url:http://localhost:45437/cgi-bin/WebObjects/AppName.woa/||shape="rect"]] (with the xxx:portnum instead of xxxx/-portnum) ... then you are using the [[Evil Direct Connect>>doc:WO.Development-Direct Connect]]. See that [[page>>doc:WO.Development-Direct Connect]] for why you don't want to be using Direct Connect. See this page for how to stop.
2 2  
3 -A summary of the following steps that applies specifically to MacOS X 10.5.5 can be found here: [[Running Through Apache - Leopard & Snow Leopard Client - Summary>>Running Through Apache - Leopard & Snow Leopard Client - Summary]]
3 +A summary of the following steps that applies specifically to MacOS X 10.5.5 can be found here: [[Running Through Apache - Leopard & Snow Leopard Client - Summary>>doc:Running Through Apache - Leopard & Snow Leopard Client - Summary]]
4 4  
5 5  = Turning on Apache =
6 6  
7 -Go to **System Preferences > Sharing > Services** and turn on **Personal Web Sharing** if it is not already on. You can also do it by command line with "apachectl":
7 +Go to **System Preferences -> Sharing -> Services** and turn on **Personal Web Sharing** if it is not already on. You can also do it by command line with "apachectl":
8 8  
9 9  {{code theme="Eclipse"}}
10 10  sudo apachectl restart
11 11  {{/code}}
12 12  
13 -When you turn on your web server, Apache will listen on the network interfaces that were configured when it starts. If you change networks, you may need to manually restart apache. You can do this by either stopping and restarting Personal Web Sharing, or you can run "apachectl restart" from the commandline as the root user. Because this can get annoying if you are working on a laptop, or periodically using VPN's, there are a couple ways to make this process easier.
13 +When you turn on your web server, Apache will listen on the network interfaces that were configured when it starts. If you change networks, you may need to manually restart apache. You can do this by either stopping and restarting Personal Web Sharing, or you can run "apachectl restart" from the commandline as the root user. Because this can get annoying if you are working on a laptop, or periodically using VPN's, there are a couple ways to make this process easier.
14 14  
15 15  = Optional Extra Configuration: Explicitly Setting Your Hostname =
16 16  
17 17  {{info title="Useful Information"}}
18 +The changes in this section are only required if you want your hostname to be stable across network changes. While this simplifies many aspects of development (like testing cookies and https), it may cause problems with those specific aspects (cookies, https, etc.) if you need to be able to access your dev machine from a remote machine, including if you need to be able to test your web app from a Parallels VM. Pascal's note: setting ServerName to localhost won't block access from other network interfaces. The only Apache configuration that can block access from other interfaces than localhost is the Listen directive. As long as you let Apache to listen on all network interfaces, access from other machines will work.
18 18  
19 -The changes in this section are only required if you want your hostname to be stable across network changes. While this simplifies many aspects of development (like testing cookies and https), it may cause problems with those specific aspects (cookies, https, etc.) if you need to be able to access your dev machine from a remote machine, including if you need to be able to test your web app from a Parallels VM. Pascal's note: setting ServerName to localhost won't block access from other network interfaces. The only Apache configuration that can block access from other interfaces than localhost is the Listen directive. As long as you let Apache to listen on all network interfaces, access from other machines will work.
20 -
21 21  Bonjour Delays: Apparently the procedure here is also useful for preventing "Bonjour" delays when you launch the browser to test your app on your development machine.
22 -
23 23  {{/info}}
24 24  
25 25  == Edit Apache Config ==
26 26  
27 27  {{warning title="Bonjour, comment ça va? .... Trés bien, merci!"}}
28 -
29 -*Do NOT try to use the Bonjour / Rendezvous name of your machine in this step.* It will cause you grief. Accept this and don't even try. You have been warned.
30 -
26 +**Do NOT try to use the Bonjour / Rendezvous name of your machine in this step.** It will cause you grief. Accept this and don't even try. You have been warned.
31 31  {{/warning}}
32 32  
33 -Edit **/etc/apache2/httpd.conf**, find the line containing **ServerName** and change it to this. If you still running Tiger (OS X 10.4), the file is at **/etc/httpd/httpd.conf**. If you develop on Linux, the configuration file is probably in **/etc/httpd/conf**.
29 +Edit **/etc/apache2/httpd.conf**, find the line containing **ServerName** and change it to this. If you still running Tiger (OS X 10.4), the file is at **/etc/httpd/httpd.conf**. If you develop on Linux, the configuration file is probably in **/etc/httpd/conf**.
34 34  
35 35  {{code}}
36 36  
... ... @@ -38,7 +38,7 @@
38 38  
39 39  {{/code}}
40 40  
41 -That line may be commented out by default. You can simply uncomment it (remove the leading pound sign). You will also need to find this block
37 +That line may be commented out by default. You can simply uncomment it (remove the leading pound sign). You will also need to find this block
42 42  
43 43  {{code}}
44 44  
... ... @@ -126,7 +126,7 @@
126 126  
127 127  or
128 128  
129 -===== {{color value="#000000"}}{*}OS X Tiger 10.4 and earlier{*}{{/color}} =====
125 +===== (% style="color: rgb(0,0,0);" %)**OS X Tiger 10.4 and earlier**(%%) =====
130 130  
131 131  {{code}}
132 132  
... ... @@ -153,7 +153,7 @@
153 153  
154 154  {{/code}}
155 155  
156 -(In 10.5 it appears to be necessary to launch with launchctl. See [[Running Monitor and wotaskd on Mac OS X 10.5 "client">>WO:WO 5.4 Getting Started||anchor="javamonitor"]])
152 +(In 10.5 it appears to be necessary to launch with launchctl. See [[Running Monitor and wotaskd on Mac OS X 10.5 "client">>doc:WO.WO 5\.4 Getting Started||anchor="javamonitor"]])
157 157  
158 158  == Finally, Configure your Application ==
159 159  
... ... @@ -168,19 +168,17 @@
168 168  
169 169  {{/code}}
170 170  
171 -The WOPort is optional, but useful if you want consistent URLs for bookmarks and such. You can use any number you want, but it needs to be unique for each application you launch (or rather, you can only run one app instance on a given WOPort at a time). In WOLips, WOPort, WODirectConnectEnabled, and WOAdaptorURL already exist and just need to be updated. WOHost does not, and needs to be added. The dash in front of the name ("-WOHost") is important and must be in the name for the setting to work properly.
167 +The WOPort is optional, but useful if you want consistent URLs for bookmarks and such. You can use any number you want, but it needs to be unique for each application you launch (or rather, you can only run one app instance on a given WOPort at a time). In WOLips, WOPort, WODirectConnectEnabled, and WOAdaptorURL already exist and just need to be updated. WOHost does not, and needs to be added. The dash in front of the name ("-WOHost") is important and must be in the name for the setting to work properly.
172 172  
173 -You may want to set this in your global WOLips settings so you don't have to set it every time you make a new launch configuration. You will need to go back and modify existing launch configurations with these settings even if you set it globally. Global settings only apply to newly created launch configurations. To change the global settings, in Eclipse, open the Eclipse menu, choose Preferences... and select WOLips > Launch.
169 +You may want to set this in your global WOLips settings so you don't have to set it every time you make a new launch configuration. You will need to go back and modify existing launch configurations with these settings even if you set it globally. Global settings only apply to newly created launch configurations. To change the global settings, in Eclipse, open the Eclipse menu, choose Preferences... and select WOLips -> Launch.
174 174  
175 175  = Apache Restart =
176 176  
177 177  {{info title="Why would I need this?"}}
178 -
179 179  If you have a laptop and you get an "Application cannot be found" or some such error in the browser after auto-switching networks (for example going from a work network to a home network), restarting apache can resolve the error condition most of the time. A script is shown below to do that.
180 -If you already implemented the "localhost" explicit hostname setup above, then you will probably not need to bother with this section.
175 + If you already implemented the "localhost" explicit hostname setup above, then you will probably not need to bother with this section.
181 181  
182 182  No, really. Why would one need this? Is there a difference between ("apachectl stop" ; "apachectl start") and "apachectl restart"? If so, that may be a problem with apachectl. If there is a difference, why is the difference important? What bad thing will happen if one only uses "apachectl restart"? Pascal's answer: there is no difference between apachectl stop/start and apachectl restart, so the restart script could simply do a "apachectl restart".
183 -
184 184  {{/info}}
185 185  
186 186  == Making a restart script ==