Changes between Version 41 and Version 42 of howto/MAMP


Ignore:
Timestamp:
Sep 4, 2009, 10:27:25 AM (15 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

reword and refactor the apache section

Legend:

Unmodified
Added
Removed
Modified
  • howto/MAMP

    v41 v42  
    2626}}}
    2727
    28 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.
     28A 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.
     29
    2930
    3031Activate your Apache installation so that it starts now and every time you boot your machine:
     
    3839If desired, reboot your machine and point your browser again to http://localhost/ to confirm that Apache is again running.
    3940
    40 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
     41
     42==== User directories ==== #userdir
     43
     44If 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:
    4145
    4246{{{
     
    4448}}}
    4549
    46 and uncomment it this way:
    47 
    48 {{{
    49 #
     50Uncomment it by removing the "`#`" at the start of the line so that it reads:
     51
     52{{{
    5053Include conf/extra/httpd-userdir.conf
    5154}}}
    5255
    53 now uncomment the line
     56Then edit `/opt/local/apache2/conf/extra/httpd-userdir.conf` add the following lines to the end of the file:
     57
     58For Mac OS X 10.4 and lower:
     59{{{
     60#
     61# Include user configurations
     62#
     63Include /private/etc/httpd/users/*.conf
     64}}}
     65
     66For Mac OS X 10.5 and above:
     67{{{
     68#
     69# Include user configurations
     70#
     71Include /private/etc/apache2/users/*.conf
     72}}}
     73
     74Restart 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.
     75
     76
     77==== Local Apache manual ==== #manual
     78
     79The [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:
    5480
    5581{{{
     
    5783}}}
    5884
    59 the same way:
    60 
    61 {{{
    62 #
     85So that it reads like this:
     86
     87{{{
    6388Include conf/extra/httpd-manual.conf
    6489}}}
    6590
    66 In `/opt/local/apache2/conf/extra/httpd-userdir.conf`, add the following lines to the end of the file:
    67 
    68 For Mac OS X 10.4 and lower
    69 {{{
    70 #
    71 # Include user configurations
    72 #
    73 Include /private/etc/httpd/users/*.conf
    74 }}}
    75 
    76 For Mac OS X 10.5 and above
    77 {{{
    78 #
    79 # Include user configurations
    80 #
    81 Include /private/etc/apache2/users/*.conf
    82 }}}
    83 
    84 
    85 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.
    86 
    87   '''''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.
     91Restart 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/.
     92
    8893
    8994=== Step 3: Install MySQL === #mysql