Changes between Version 41 and Version 42 of howto/MAMP
- Timestamp:
- Sep 4, 2009, 10:27:25 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
howto/MAMP
v41 v42 26 26 }}} 27 27 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. 28 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. 29 29 30 30 31 Activate your Apache installation so that it starts now and every time you boot your machine: … … 38 39 If desired, reboot your machine and point your browser again to http://localhost/ to confirm that Apache is again running. 39 40 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 44 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: 41 45 42 46 {{{ … … 44 48 }}} 45 49 46 and uncomment it this way: 47 48 {{{ 49 # 50 Uncomment it by removing the "`#`" at the start of the line so that it reads: 51 52 {{{ 50 53 Include conf/extra/httpd-userdir.conf 51 54 }}} 52 55 53 now uncomment the line 56 Then edit `/opt/local/apache2/conf/extra/httpd-userdir.conf` add the following lines to the end of the file: 57 58 For Mac OS X 10.4 and lower: 59 {{{ 60 # 61 # Include user configurations 62 # 63 Include /private/etc/httpd/users/*.conf 64 }}} 65 66 For Mac OS X 10.5 and above: 67 {{{ 68 # 69 # Include user configurations 70 # 71 Include /private/etc/apache2/users/*.conf 72 }}} 73 74 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. 75 76 77 ==== Local Apache manual ==== #manual 78 79 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: 54 80 55 81 {{{ … … 57 83 }}} 58 84 59 the same way: 60 61 {{{ 62 # 85 So that it reads like this: 86 87 {{{ 63 88 Include conf/extra/httpd-manual.conf 64 89 }}} 65 90 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. 91 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/. 92 88 93 89 94 === Step 3: Install MySQL === #mysql