VMware Communities
rbadesign
Contributor
Contributor
Jump to solution

MAMP

Hi,

Surfing on my PHP/MySQL server on Mac

As a webdesigner, I plan to use Fusion to check my designs trough IE7.

How can I reach my localhost from my virtual machine ?

Thx for your help,

Best Regards

0 Kudos
1 Solution

Accepted Solutions
objectcentral
Enthusiast
Enthusiast
Jump to solution

Use the Mac Network Utility (in Applications/Utilities) to find the Mac's IP address, and use that directly from the VM.

You can also goto http://dyndns.com and set up a mapping address (such as: myownmachine.selfip.com - there's lots of choices) that will dynamically map a real web address to the IP of your machine. This is a bit non-trivial - you have to set up a program on you machine (or setup your router/gateway) to notify dyndns.com of your current IP address, which usually changes at the whim of your ISP. And if you are connected to the web via a router, your Mac's IP won't be the same as the IP you need to tell dyndns.com about, and you have to map things - but in the end, you have a cool way to get to your machine from anywhere. This isn't a complete howto of dyndns.com, but just to let you know the capability. The service is free (with some restrictions), or really cheap for full service.

Hope that was your question...

View solution in original post

0 Kudos
8 Replies
objectcentral
Enthusiast
Enthusiast
Jump to solution

Use the Mac Network Utility (in Applications/Utilities) to find the Mac's IP address, and use that directly from the VM.

You can also goto http://dyndns.com and set up a mapping address (such as: myownmachine.selfip.com - there's lots of choices) that will dynamically map a real web address to the IP of your machine. This is a bit non-trivial - you have to set up a program on you machine (or setup your router/gateway) to notify dyndns.com of your current IP address, which usually changes at the whim of your ISP. And if you are connected to the web via a router, your Mac's IP won't be the same as the IP you need to tell dyndns.com about, and you have to map things - but in the end, you have a cool way to get to your machine from anywhere. This isn't a complete howto of dyndns.com, but just to let you know the capability. The service is free (with some restrictions), or really cheap for full service.

Hope that was your question...

0 Kudos
rbadesign
Contributor
Contributor
Jump to solution

Thx a lot, the IP solution functionned perfectly...

I can now keep on now.

0 Kudos
jazzerbobby
Contributor
Contributor
Jump to solution

Hey there,

I'm trying this on a new MacBook Pro (10.5). I can navigate to the PHP file I need to run but I see the PHP code in the browser, rather than it's output.

I've turned on web sharing in system prefs, set MAMP apache document root to: /Users/computername/Sites and am calling the file through a browser with this URL structure: http://ipaddress/~computername/file.php

MAMP has it's green lights on for both Apache & SQL.

I've missed something here, or got hold of the wrong end of the stick... what's my mistake?

Cheers

JB

0 Kudos
admin
Immortal
Immortal
Jump to solution

What does this have to do with Fusion? I mean, you're welcome to ask and maybe someone can help, but...

0 Kudos
jazzerbobby
Contributor
Contributor
Jump to solution

Sorry, should've mentioned I'm using Fusion to run XP with Leopard.

0 Kudos
admin
Immortal
Immortal
Jump to solution

Err, still not clear. What part of this is in XP and what part is in Leopard? Have you tested the site from the environment containing the server?

0 Kudos
jazzerbobby
Contributor
Contributor
Jump to solution

Ah, ok, I've got MAMP running in Leopard, and the PHP files are also on the Leopard side.

Using a browser on the Leopard side, and the standard MAMP URL structure ( http://localhost:8888/site/file.php ) everything checks out as per usual.

On both the Leopard and XP side, using the Mac's IP address ( http://ipaddress/site/file.php ), the browser returns unprocessed PHP code. It's as if MAMP is being ignored???

0 Kudos
dp_fusion
Enthusiast
Enthusiast
Jump to solution

In the httpd server is there a virtual host defined? If so is that virtual hostname and IP in the Windows host table or in DNS?

0 Kudos