ryandesign at macports.org
Wed Jan 6 21:51:02 PST 2010
On Jan 6, 2010, at 23:36, Bradley Giesbrecht wrote:
> On Jan 6, 2010, at 9:28 PM, Ryan Schmidt wrote:
>> On Jan 6, 2010, at 22:10, Celso Coutinho wrote:
>>> This may look like a noob question, but how do I turn Macports apache back on?
>> To turn MacPorts apache2 off, use
>> sudo port unload apache2
>> To turn it on, use
>> sudo port load apache2
> Does this survive a reboot?
> I would have used launchd to stop both apaches and restart the one I wanted.
> sudo launchd unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
> sudo launchd unload -w /Library/LaunchDaemons/org.macports.apache2.plist
> sudo launchd load -w /Library/LaunchDaemons/org.macports.apache2.plist
Yes, it survives a reboot. "sudo port (load|unload) (port)" is an easier-to-remember synonym for "sudo launchctl (load|unload) -w /Library/LaunchDaemons/org.macports.(port).plist".
If you're comfortable using launchctl to stop Apple's apache, feel free. It should be equivalent to clicking the appropriate Start/Stop button in the Sharing system preferences.
More information about the macports-users