Changes between Version 79 and Version 80 of howto/MAMP


Ignore:
Timestamp:
Dec 28, 2014, 8:10:45 PM (9 years ago)
Author:
magill@…
Comment:

more detail on the initial Apache installation and config verification

Legend:

Unmodified
Added
Removed
Modified
  • howto/MAMP

    v79 v80  
    3232A 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.
    3333
    34 
     34=== Verify your config file ===
     35Verify any changes you have made to the config file: /opt/local/apache2/conf/httpd.conf
     36{{{
     37 /opt/local/apache2/bin/apachectl -t
     38}}}
     39This will return either "Syntax OK" or a specific line by line error listing.
     40
     41=== Activate Apache2 ===
    3542Activate your Apache installation so that it starts now and every time you boot your machine:
    3643
     
    3845sudo port load apache2
    3946}}}
     47If when you issue this command, you immediately receive the message:
     48 /opt/local/etc/LaunchDaemons/org.macports.apache2/org.macports.apache2.plist: Operation already in progress
     49This 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.
     50
     51After correcting any config errors and saving the updated config file, simply run:
     52{{{
     53sudo port unload apache2
     54}}}
     55
     56to stop apache (even though it is not running) and then start it using
     57
     58{{{
     59sudo port load apache2
     60}}}
     61
     62to start it again.
     63
     64The default log file location is: /opt/local/apache2/logs/. The startup will be logged in "error_log"
     65
     66=== Initial changes to the config file ===
    4067
    4168If the sever name is not set properly in the configuration file, `/opt/local/apache2/conf/httpd.conf`, you will encounter the warning below.