Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running PHP 5.4 on OS X which allows me to set up a virtual server for any directory, using this Terminal command:

php -S localhost:8000

This will then set up http://localhost:8000 which works great, but what I would like to do is share this server with the instance of Windows that I have running through VMWare in order to test in Internet Explorer. I was wondering if this is possible and if it is, how do I go about setting it up? Currently trying to visit http://localhost:8000 gives me 'This page cannot be displayed'.

I'd really appreciate any help that you can give me on this as I don't have much experience with virtual machines/networking. Thanks in advance.

share|improve this question
    
Instead of saying you want to create a virtual server on 127.0.0.1 aka localhost provide your actual ip address or at the very least an internal intranet ip address like 192.168.1.1 – Ramhound Jun 27 '13 at 11:47
up vote 0 down vote accepted

Thanks to Ramhound I've found the answer. When OS X's file sharing is enabled, the system preferences gives you a message saying 'Computers on your local network can access your computer at: My-Mac.local'. After trying the IP address (which didn't work), I tried to setup My-Mac.local:8000 instead, which worked! So for anyone who had this issue, simply use this terminal command:

php -S My-Mac.local:8000

Obviously replacing My-Mac.local with your computer's local name, and a different port if you'd like. :-)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .