| Any MAMP users here? I love my MacBook Pro, but getting Apache, PHP and MySQL to work on it has been a nightmare. I finally downloaded MAMP, which has been another nightmare. I beat my brains out making my virtual hosts work, only to discover that they were associated with my default Apache installation, which was still running.
Anyway, I've now learned how to shut down Apache #1, and I assume Apache #2 (the MAMP version) is working correctly, because I can at least view phpMyAdmin. But I apparently have to go back to square one to make my virtual hosts work again.
They didn't work with Apache #1 until I did two things:
1) Delete ever instance of 127.0.0.1 in httpd.conf, even though I use 127.0.0.1 in my hosts file
2) Change every virtual host in NetInfo to lower case, even if they're capitalized everywhere else
Now that I'm focused on Apache #2, I've changed my port number from 80 to 8888 in my newer (MAMP) httpd.conf file.
Below is a copy of virtual host scripts. I originally copied them over from my PC, but they were working with Apache #1 on my Mac.
Thanks for any tips!
* * * * * * * * *
NameVirtualHost *:8888
# Leave this one alone - it makes sure that localhost works.
#<VirtualHost 127.0.0.1:8888>
<VirtualHost *:8888>
DocumentRoot /Library/WebServer/Documents
ServerName localhost
</VirtualHost>
<VirtualHost *:8888>
ServerName Geobop
ServerAdmin [e-mail address]
DocumentRoot /Users/MyName/Sites/Geobop
</VirtualHost>
#<VirtualHost 127.0.0.1:8888>
<VirtualHost *:8888>
ServerName GW
ServerAdmin [e-mail address]
DocumentRoot /Users/MyName/Sites/GW
</VirtualHost>
<IfModule mod_php4.c>
# If php is turned on, we repsect .php and .phps files.
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# Since most users will want index.php to work we
# also automatically enable index.php
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
</IfModule>
<IfModule mod_bonjour.c>
# Only the pages of users who have edited their
# default home pages will be advertised on Bonjour.
RegisterUserSite customized-users
#RegisterUserSite all-users
# Bonjour advertising for the primary site is off by default.
#RegisterDefaultSite
</IfModule>
Include /private/etc/httpd/users/*.conf |