image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old March 25th, 2007, 03:25 PM
Registered User
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
David B is on a distinguished road
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
Reply With Quote
  #2  
Old March 25th, 2007, 04:52 PM
ScottW's Avatar
Founder
 
Join Date: Sep 2000
Location: Overland Park, KS
Posts: 3,165
Thanks: 0
Thanked 5 Times in 2 Posts
ScottW is on a distinguished road
Yes, you need to turn off the Mac installed version of Apache so you can run MAMP. But, you found that out and so Im confused of what your issue is now? When you to go http://localhost:8888 what comes up, anything?

Have you tried removing the "Include" at the bottom for the time being? Do you the Mac firewall turned off? If on, is 8888 allowed? Tried turning off your firewall to eliminate any possible issues.
Reply With Quote
  #3  
Old March 25th, 2007, 05:49 PM
Registered User
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
David B is on a distinguished road
Quote:
Originally Posted by ScottW View Post
Yes, you need to turn off the Mac installed version of Apache so you can run MAMP. But, you found that out and so Im confused of what your issue is now?
Well, I THINK MAMP's Apache installation is now running correctly, so my next goal is to make virtual hosts and .htaccess files with mod-rewrite rules work. I had virtual hosts working with the default Apache installation, though it was a lot of work, and I just stumbled over the solution.

Quote:
When you to go http://localhost:8888 what comes up, anything?
A blank page with a column of numerals on the left side.

Quote:
Have you tried removing the "Include" at the bottom for the time being? Do you the Mac firewall turned off? If on, is 8888 allowed? Tried turning off your firewall to eliminate any possible issues.
Sorry, that's all new stuff for me. I can view MAMP's home page at http://localhost:8888/MAMP/?language=English . . . I assume that confirms that 8888 is allowed, right? But I haven't learned how to work with firewalls yet, and I don't know what you mean by "Include."

I did some more research and also learned that I may have to create a symlink? Sheez, I wish the folks at MAMP had created a step-by-step guide!

I also discovered my Apache log. I don't know how to interpret it, but I'll paste some of the first and last lines below. Thanks!

[Sat Mar 24 20:32:22 2007] [notice] Digest: generating secret for digest authentication ...
[Sat Mar 24 20:32:22 2007] [notice] Digest: done
[Sat Mar 24 20:32:22 2007] [notice] Apache/2.0.59 (Unix) PHP/5.1.6 DAV/2 configured -- resuming normal operations
[Sat Mar 24 20:37:40 2007] [error] [client 127.0.0.1] File does not exist: /Applications/MAMP/bin/phpMyAdmin/css/themes, referer: http://localhost:8888/phpMyAdmin/css...js_frame=right
[Sat Mar 24 20:37:42 2007] [error] [client 127.0.0.1] File does not exist: /Applications/MAMP/bin/phpMyAdmin/css/themes, referer: http://localhost:8888/phpMyAdmin/css...js_frame=right
[Sat Mar 24 20:37:47 2007] [error] [client 127.0.0.1] File does not exist: /Applications/MAMP/bin/phpMyAdmin/css/themes, referer: http://localhost:8888/phpMyAdmin/css...js_frame=right

[I deleted a bunch of stuff here.]

/Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so: (null)
Failed loading /Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so: (null)
Failed loading /Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so: (null)
Failed loading /Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so: (null)
[Sun Mar 25 14:26:12 2007] [notice] caught SIGTERM, shutting down
Failed loading /Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so: (null)
[Sun Mar 25 14:26:18 2007] [notice] Digest: generating secret for digest authentication ...
[Sun Mar 25 14:26:18 2007] [notice] Digest: done
[Sun Mar 25 14:26:18 2007] [notice] Apache/2.0.59 (Unix) PHP/5.1.6 DAV/2 configured -- resuming normal operations
Reply With Quote
  #4  
Old March 25th, 2007, 07:10 PM
Registered User
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
David B is on a distinguished road
Sorry to cut and run, but I just made a big decision. After searching for solutions on the Internet, I finally realized that Apache is WAY over my head. I came across similar comments from others who appear to know more about this sort of stuff than I do. Some of them stuck with MAMP, but they used the default Apache installation instead of MAMP's Apache program.

So I think I'm going to switch gears and go back to my default Apache program; at least my virtual hosts work with it. I still need to figure out how to get my .htaccess files to work, but I think I'd better start a new thread and bury this one. However, I'm adding the URL to my notes for future reference. Thanks so much for the tips.
Reply With Quote
  #5  
Old March 25th, 2007, 08:19 PM
Registered User
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
David B is on a distinguished road
Quote:
Originally Posted by ScottW View Post
Have you tried removing the "Include" at the bottom for the time being?
Duh...I guess I wasn't thinking. I just realized what you were referring to, so I commented out and, VOILA, it works. Thanks!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 11:08 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.