[MacPorts] howto/MAMP modified

MacPorts noreply at macports.org
Sun Dec 28 13:20:56 PST 2014


Page "howto/MAMP" was changed by magill at mac.com
Diff URL: <https://trac.macports.org/wiki/howto/MAMP?action=diff&version=82>
Revision 82
Comment: cosmetics
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/MAMP
=========================================================================
--- howto/MAMP (version: 81)
+++ howto/MAMP (version: 82)
@@ -31,14 +31,14 @@
 
 A sample configuration file is provided in `/opt/local/apache2/conf/original/httpd.conf`. Don't edit this file; leave it as is so you can refer to the defaults later. The first time you install apache2, the sample configuration file will be copied to `/opt/local/apache2/conf/httpd.conf` for you. You can edit this file as desired. When you later upgrade apache2 to a newer version, MacPorts will upgrade the sample configuration file but will not modify your `httpd.conf`, so be sure to manually compare your `httpd.conf` with the new sample configuration file and bring over any relevant changes. You should also keep backup copies of your `httpd.conf` in a safe place.
 
-=== Verify your config file ===
+== 2A:  Verify your config file ==
 Verify any changes you have made to the config file: /opt/local/apache2/conf/httpd.conf
 {{{
  /opt/local/apache2/bin/apachectl -t
 }}}
 This will return either "Syntax OK" or a specific line by line error listing.
 
-=== Activate Apache2 ===
+==  2B: Activate Apache2 ==
 Activate your Apache installation so that it starts now and every time you boot your machine: 
 
 {{{
@@ -61,9 +61,21 @@
 
 to start it again.
 
-The default log file location is: /opt/local/apache2/logs/. The startup will be logged in "error_log"
-
-=== Initial changes to the config file ===
+The default log file location is: '''/opt/local/apache2/logs/'''. The startup will be logged in "'''error_log'''"
+
+== 2C: Initial changes to the config file ==
+Once you have determined that your basic installation is working, you need to consider making some initial changes to your config file.
+
+After each change to the config file, you should again verify the file syntax, and then you need to stop and restart Apache for the changes to take effect.
+
+{{{
+/opt/local/apache2/bin/apachectl -t
+sudo port unload apache2
+sudo port load apache2
+}}}
+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.
+
+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.
 
 If the sever name is not set properly in the configuration file, `/opt/local/apache2/conf/httpd.conf`, you will encounter the warning below. 
 
@@ -82,7 +94,7 @@
 If desired, reboot your machine and point your browser again to http://localhost/ to confirm that Apache is again running.
 
 '''NOTE:''' If you have set "ServerName" to be anything other than "localhost" the links above to "localhost" will fail with Safari complaining "''Failed to open page. Safari can't open the page "localhost" because Safari can't connect to the server "localhost".''
-== User directories == #userdir
+=== User directories === #userdir
 
 If you would like to be able to access web pages in the Sites directory of your home directory, edit `/opt/local/apache2/conf/httpd.conf` and locate the following line:
 
@@ -131,7 +143,7 @@
 
 to start it again.
 
-== Local Apache manual == #manual
+=== 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:
 
@@ -147,7 +159,7 @@
 
 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
+=== Secure Sockets (https) === #ssl
 
 This works for a development system (not recommended for production!).
 
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/howto/MAMP>
MacPorts <https://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'howto/MAMP' page.
If it was not you, please report to .


More information about the macports-changes mailing list