Changes between Version 82 and Version 83 of howto/MAMP


Ignore:
Timestamp:
Dec 28, 2014, 9:56:19 PM (9 years ago)
Author:
magill@…
Comment:

cosmetic

Legend:

Unmodified
Added
Removed
Modified
  • howto/MAMP

    v82 v83  
    7474sudo port load apache2
    7575}}}
    76 In Apache documentation (including this page), you will see the use of "apachectl -k restart" described as the method to cause the config file to be re-read.
    77 
    78 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 shoulduse "port" to tell launchctl to unload apache2, then load it again. This will result in a short interruption of service.
     76In Apache documentation (including this page), you will see the use of "''apachectl -k restart''" described as the method to cause the config file to be re-read.
     77
     78However under OSX, 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 shoulduse "port" to tell launchctl to unload apache2, then load it again. This will result in a short interruption of service.
    7979
    8080If the sever name is not set properly in the configuration file, `/opt/local/apache2/conf/httpd.conf`, you will encounter the warning below.
     
    127127
    128128Restart 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.
    129 
    130 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 "port" to tell launchctl to unload apache2, then load it again. This will result in a short interruption of service.
    131 
    132 This is done by using
    133 
    134 {{{
    135 sudo port unload apache2
    136 }}}
    137 
    138 to stop apache and then using
    139 
    140 {{{
    141 sudo port load apache2
    142 }}}
    143 
    144 to start it again.
    145129
    146130=== Local Apache manual === #manual