[MacPorts] howto/MAMP modified

MacPorts noreply at macports.org
Fri Sep 4 03:27:27 PDT 2009


Changed page "howto/MAMP" by ryandesign at macports.org from 75.44.29.196*
Page URL: <http://trac.macports.org/wiki/howto/MAMP>
Diff URL: <http://trac.macports.org/wiki/howto/MAMP?action=diff&version=42>
Revision 42
Comment: reword and refactor the apache section

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/MAMP
=========================================================================
--- howto/MAMP (version: 41)
+++ howto/MAMP (version: 42)
@@ -25,7 +25,8 @@
 sudo port install apache2
 }}}
 
-The first time you install apache2, a configuration file will be created for you at /opt/local/apache2/conf/httpd.conf. When you later upgrade apache2 to a newer version, be sure to manually compare your httpd.conf with the new sample configuration file at /opt/local/apache2/conf/original/httpd.conf and bring over any relevant changes. MacPorts will not modify your configuration files for you.
+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.
+
 
 Activate your Apache installation so that it starts now and every time you boot your machine: 
 
@@ -37,54 +38,58 @@
 
 If desired, reboot your machine and point your browser again to http://localhost/ to confirm that Apache is again running.
 
-You may want to enable local access to the "Apache HTTP Server Manual" and to User web pages. In `/opt/local/apache2/conf/httpd.conf`, search for the line 
+
+==== 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:
 
 {{{
 #Include conf/extra/httpd-userdir.conf
 }}}
 
-and uncomment it this way:
-
-{{{
-#
+Uncomment it by removing the "`#`" at the start of the line so that it reads:
+
+{{{
 Include conf/extra/httpd-userdir.conf
 }}}
 
-now uncomment the line
+Then edit `/opt/local/apache2/conf/extra/httpd-userdir.conf` add the following lines to the end of the file:
+
+For Mac OS X 10.4 and lower:
+{{{
+#
+# Include user configurations
+#
+Include /private/etc/httpd/users/*.conf
+}}}
+
+For Mac OS X 10.5 and above:
+{{{
+#
+# Include user configurations
+#
+Include /private/etc/apache2/users/*.conf
+}}}
+
+Restart 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.
+
+
+==== 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:
 
 {{{
 #Include conf/extra/httpd-manual.conf
 }}}
 
-the same way:
-
-{{{
-#
+So that it reads like this:
+
+{{{
 Include conf/extra/httpd-manual.conf
 }}}
 
-In `/opt/local/apache2/conf/extra/httpd-userdir.conf`, add the following lines to the end of the file:
-
-For Mac OS X 10.4 and lower
-{{{
-#
-# Include user configurations
-#
-Include /private/etc/httpd/users/*.conf
-}}}
-
-For Mac OS X 10.5 and above
-{{{
-#
-# Include user configurations
-#
-Include /private/etc/apache2/users/*.conf
-}}}
-
-
-Restart Apache (`sudo /opt/local/apache2/bin/apachectl -k restart`) and verify that everything’s running. You should now be able to go to http://localhost/manual/ to access the manual, and you should be able to access your personal user web site at http://localhost/~username/, where "username" is your login id.
-
-  '''''Note:''''' When upgrading your Apache installation, MacPorts will not overwrite or in any way alter your httpd.conf or any of the extra configuration files. You may still want to back up your configuration files from time to time, just to be safe. When upgrading to a newer version, you may also want to compare your configuration file to the current sample files, in case things have changed.
+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/.
+
 
 === Step 3: Install MySQL === #mysql
 

-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on howto/MAMP. If it was not you, please
report to .


More information about the macports-changes mailing list