Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have 2 computers on a LAN (OS X and Vista). MAMP installed on OS X. I want view the site being developed from my Vista machine. I shared the htdocs file on the LAN. Clearly only the html is working properly.

What do I need to change to make Apache host my site on the LAN?

Solution: Such a dumb mistake: I was typing \\192.168.x.x (fill in x) which is the shared file. This does not share the server. http://192.168.x.x is the correct address.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

There is pretty good documentation

I suspect you just need to put your HTML files into the correct htdocs folder, start Apache, and then, on your Vista PC, point a web browser at the name or IP-address of your Mac. For example, http://192.168.1.23:8888/ (I believe MAMP is set to use port 8888 by default)


(Edit)

Using \\ as a prefix makes the web-browser use the File: protocol not the http: protocol.

It is only if you use the http protocol that the request is sent to Apache (The A in MAMP). It is only by sending the request to Apache that you get Apache to run the PHP code as a program and send the output of that PHP program to the web-browser.

Putting \\ in front means the request goes to a File server, not to Apache. The file server doesn't attempt to run the PHP code, it just send the PHP source code (and not the results of running that code).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.