[MacPorts] howto/MAMP modified

MacPorts noreply at macports.org
Sun Dec 28 12:10:47 PST 2014


Page "howto/MAMP" was changed by magill at mac.com
Diff URL: <https://trac.macports.org/wiki/howto/MAMP?action=diff&version=80>
Revision 80
Comment: more detail on the initial Apache installation and config verification
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/MAMP
=========================================================================
--- howto/MAMP (version: 79)
+++ howto/MAMP (version: 80)
@@ -31,12 +31,39 @@
 
 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 ===
+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 ===
 Activate your Apache installation so that it starts now and every time you boot your machine: 
 
 {{{
 sudo port load apache2
 }}}
+If when you issue this command, you immediately receive the message:
+ /opt/local/etc/LaunchDaemons/org.macports.apache2/org.macports.apache2.plist: Operation already in progress
+This means that the Launch Daemon believes that it successfully started Apache. At this point, a configuration error is your most likely problem. Verify your config file as above.
+
+After correcting any config errors and saving the updated config file, simply run:
+{{{
+sudo port unload apache2
+}}}
+
+to stop apache (even though it is not running) and then start it using
+
+{{{
+sudo port load apache2
+}}}
+
+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 ===
 
 If the sever name is not set properly in the configuration file, `/opt/local/apache2/conf/httpd.conf`, you will encounter the warning below. 
 
-------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