Changes between Version 79 and Version 80 of howto/MAMP
- Timestamp:
- Dec 28, 2014, 8:10:45 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
howto/MAMP
v79 v80 32 32 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. 33 33 34 34 === Verify your config file === 35 Verify any changes you have made to the config file: /opt/local/apache2/conf/httpd.conf 36 {{{ 37 /opt/local/apache2/bin/apachectl -t 38 }}} 39 This will return either "Syntax OK" or a specific line by line error listing. 40 41 === Activate Apache2 === 35 42 Activate your Apache installation so that it starts now and every time you boot your machine: 36 43 … … 38 45 sudo port load apache2 39 46 }}} 47 If 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 49 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. 50 51 After correcting any config errors and saving the updated config file, simply run: 52 {{{ 53 sudo port unload apache2 54 }}} 55 56 to stop apache (even though it is not running) and then start it using 57 58 {{{ 59 sudo port load apache2 60 }}} 61 62 to start it again. 63 64 The 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 === 40 67 41 68 If the sever name is not set properly in the configuration file, `/opt/local/apache2/conf/httpd.conf`, you will encounter the warning below.