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

From version 30.1
edited by Ray Kiddy
on 2011/01/13 17:04
Change comment: add question to restart script info
To version 31.1
edited by Pascal Robert
on 2011/05/09 01:42
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.kiddyr
1 +XWiki.probert
Content
... ... @@ -4,8 +4,12 @@
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.
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 +{{code theme="Eclipse"}}
10 +sudo apachectl restart
11 +{{/code}}
12 +
9 9  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.
10 10  
11 11  = Optional Extra Configuration: Explicitly Setting Your Hostname =
... ... @@ -26,7 +26,7 @@
26 26  
27 27  {{/warning}}
28 28  
29 -Edit **/etc/httpd/httpd.conf**, find the line containing **ServerName** and change it to this. If you use Leopard (OS X 10.5), the file is at **/etc/apache2/httpd.conf**.
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**.
30 30  
31 31  {{code}}
32 32  
... ... @@ -74,6 +74,10 @@
74 74  
75 75  {{/code}}
76 76  
81 +{{info}}
82 +If you installed WebObjects in another directory (for instance, /Developer/WebObjects), prepend that directory path in front of /System.
83 +{{/info}}
84 +
77 77  Then restart apache:
78 78  
79 79  {{code}}
... ... @@ -108,22 +108,22 @@
108 108  
109 109  Now you need to restart wotaskd:
110 110  
111 -===== OS X Tiger 10.4 =====
119 +===== OS X 10.5 Leopard and afterward (where launchd is used to control wotaskd) =====
112 112  
113 113  {{code}}
114 114  
115 -sudo systemstarter stop "WebObjects Services"
116 -sudo systemstarter start "WebObjects Services"
123 +sudo launchctl stop com.apple.webobjects.wotaskd
117 117  
118 118  {{/code}}
119 119  
120 120  or
121 121  
122 -===== OS X 10.5 Leopard (where launchd is used to control wotaskd) =====
129 +===== {{color value="#000000"}}{*}OS X Tiger 10.4 and earlier{*}{{/color}} =====
123 123  
124 124  {{code}}
125 125  
126 -sudo launchctl stop com.apple.webobjects.wotaskd
133 +sudo systemstarter stop "WebObjects Services"
134 +sudo systemstarter start "WebObjects Services"
127 127  
128 128  {{/code}}
129 129  
... ... @@ -145,7 +145,7 @@
145 145  
146 146  {{/code}}
147 147  
148 -(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 5.4 Getting Started||anchor="javamonitor"]]
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 5.4 Getting Started||anchor="javamonitor"]])
149 149  
150 150  == Finally, Configure your Application ==
151 151  
... ... @@ -162,7 +162,7 @@
162 162  
163 163  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.
164 164  
165 -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.
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.
166 166  
167 167  = Apache Restart =
168 168  
... ... @@ -171,9 +171,8 @@
171 171  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.
172 172  If you already implemented the "localhost" explicit hostname setup above, then you will probably not need to bother with this section.
173 173  
174 -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"?
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".
175 175  
176 -
177 177  {{/info}}
178 178  
179 179  == Making a restart script ==
... ... @@ -188,3 +188,5 @@
188 188  /usr/sbin/apachectl start
189 189  
190 190  {{/code}}
198 +
199 +Please note that you DON'T need to do this if you set your ServerName in Apache to localhost. Running everything under localhost is the best way to go.