[MacPorts] howto/MAMP modified

MacPorts noreply at macports.org
Thu Nov 18 21:09:00 PST 2010


Changed page "howto/MAMP" by samii at me.com from 86.74.110.215*
Page URL: <https://trac.macports.org/wiki/howto/MAMP>
Diff URL: <https://trac.macports.org/wiki/howto/MAMP?action=diff&version=57>
Revision 57
Comment: Added alternate procedure to stop and start apache2

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/MAMP
=========================================================================
--- howto/MAMP (version: 56)
+++ howto/MAMP (version: 57)
@@ -73,6 +73,22 @@
 
 Restart Apache using `sudo /opt/local/apache2/bin/apachectl -k restart` to make this change take effect. You can then view your personal pages by accessing http://localhost/~username/, where "username" is your Mac OS X account's short name.
 
+However, the purpose of launchd is to notice processes that stop without its knowledge, and to restart them. So if you use apachectl -k restart, launchd may notice apache "crashing" and restart it itself, confusing apachectl. Instead, you may want to use launchctl to unload apache2, then load it again. This will result in a short interruption of service.
+
+This is done by using 
+
+{{{
+sudo launchctl unload -w /Library/LaunchDaemons/org.macports.apache2.plist
+}}}
+
+to stop apache and then using
+
+{{{
+sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
+}}}
+
+to start it again.
+
 ==== Local Apache manual ==== #manual
 
 The [http://httpd.apache.org/docs/2.2/ Apache manual] is available on the Apache web site. If you would like to be able to access a copy of this manual on your web server, edit `/opt/local/apache2/conf/httpd.conf` and uncomment the following line:
@@ -88,7 +104,6 @@
 }}}
 
 Restart Apache using `sudo /opt/local/apache2/bin/apachectl -k restart` to make this change take effect. You can then view the manual by accessing http://localhost/manual/.
-
 
 ==== Secure Sockets (https) ==== #ssl
 

-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on howto/MAMP. If it was not you, please
report to .


More information about the macports-changes mailing list