Accessing web server on host

Patrick J

Junior Member
Hello

I've done a search through the threads and found various postings similar to what I am looking for but not the same. I still can't work it out myself :)

On my OS X 10.4.9 I have got MAMP which is is very nicely packaged server software for running Apache and MySQL. With MAMP I select a folder on hard drive and that becomes the Root folder for the hard drive.

Into the web-browser I put a localhost web address with a specified port number and that takes me to that root in the browser.

As you've probably guessed I'd like to be able to access that same root from Windows IE 6 and IE 7 which I have on Windows XP running in Parallels build 3188. I want to access this through the MAMP server so that PHP and MySQL will be working on web-pages viewed this way.

I'd be grateful if someone would explain how this is done.

Thank you :)
 
Look at the OS X System preferences/Network, and find out what IP address your OS X system is using on its Ethernet interface.

In IE6 or 7 in XP, enter that address and the MAMP port number in the address field. That should take you to your MAMP web site.

PS. If you have the OS X firewall enabled (System Prefs/Sharing) then you will need to allow traffic for the MAMP port number inbound through the firewall. The default MAMP port looks to be port 80. If that's the port you are using then all you need is to enable personal web sharing in the firewall settings. Alternatively, you can switch the firewall off if you have a hardware router providing adequate protection between you and the Internet.

Correction - MAMP defaults to port 8888 for its Apache web server, so if you are using that setting and have OS X firewall enabled you will need to click New... in the System Preferences/Sharing/Firewall tab and enter 8888 as a TCP port number for a new port. Select Other as the port name, and enter MAMP in the description field so that you can remember what it's for.
 
Last edited:
Thank you very much Alan. This is working fine now. I do have a hardware router with its own firewall so the OS X firewall is off.

I realised that MAMP defaults to 8888 and not 80 as you stated in your original posting but I am grateful to you for clarifying this.

It seems that now I can view the web pages I'm developing on my Mac in IE 6 and IE 7 and test out PHP scripts and MySQL interaction in IE 6 and IE 7 as well. This is extremely useful indeed and adds an additional dimension to the excellent Parallels for me.

I will add, for anyone that is interested in such things, that if you want Apache, PHP and MySQL functioning on your Mac without having to get up to things in Terminal then I can really recommend the free MAMP. It is so easy to set up and get going and imho quite fun :)
 
just in passing
I keep all my data in the mac file system
I just selected one by one the mac desktop and each volume of the 4 hard disks
(laptop and two usb and one firewire)

Mac OS menu bar >> PD >> Devices >> shared folders >> add

I chose the GUI over DOS about 11 years ago so expect all this port mangement to be automated and plug and play

I used to subscribe to the apple development system
and get a monthly box of beta software on CD

If you want really to hack the mac register as a developer
http://developer.apple.com/ and gte readig

personaliy I am more interested in content than sql or java
I have an html page with links to all my blogs and web pages and listas and baords i admin, and most used database

I keep this on my mac in a shared folder and use it as homepage for all the browsers on both OS

I edit it in Mozilla composer now and then
(this concept goes back to netscape 5 or 6 which used to save its favourites as a html page
which you could use a as home page)

Hugh W
 
Last edited:
Patrick J said:
Thank you very much Alan. This is working fine now. I do have a hardware router with its own firewall so the OS X firewall is off.
Pleased to help :)

I realised that MAMP defaults to 8888 and not 80 as you stated in your original posting but I am grateful to you for clarifying this.
Yes. I was misled by a screenshot on their site showing :80, but I downloaded MAMP and ran it and then realised they were using :8888 by default. Hence my edit.

It seems that now I can view the web pages I'm developing on my Mac in IE 6 and IE 7 and test out PHP scripts and MySQL interaction in IE 6 and IE 7 as well. This is extremely useful indeed and adds an additional dimension to the excellent Parallels for me.
The php and mysql are all executed on the Mac, of course, so your main concerns in browser testing will be that your HTML and CSS are OK - particularly in IE6.

I will add, for anyone that is interested in such things, that if you want Apache, PHP and MySQL functioning on your Mac without having to get up to things in Terminal then I can really recommend the free MAMP. It is so easy to set up and get going and imho quite fun :)
It' s a bit off-topic, but I must say I fell at an early hurdle when I tried loading up an OS X-ready copy of phpBB and it couldn't find the MAMP instance of mysql. I tried a few different addressing configs, but couldn't get it to play. However, it does look like a good platform for developing apache/mysql/php apps from scratch.
 
Accessing apache server on Mac OSX

So if my Mac is using DHCP, I will have to regularly change the hosts file on my Vista guest OS?. I use virtual hosts in my apache, and need the hostname passed from the browser.

Wish there were a better way!

Cheers,
Steve
 
Back
Top