homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / The Macintosh Webmaster
Forum Library, Charter, Moderators: travelin cat

The Macintosh Webmaster Forum

Using Mac server locally not shared
Is it possible?

WebmasterWorld Senior Member 10+ Year Member

Msg#: 3605436 posted 4:32 pm on Mar 19, 2008 (gmt 0)

OK, Mac newbie since August 2007 here so be gentle. :-) I've just learnt from a website how to turn on PHP and Apache on Mac OS X Leopard, which works great. But I had to turn on Web Sharing from the System Preferences to do it. I then found other machines on the network we use were able to view the Apache default page I have. How do I make the server so it is only viewable on this Mac?

I used XAMPP before on a PC and it was (AFAIK!) only accessible via "localhost". But I see my PHP scripts are also using that address on the Mac, and I'm worried that they won't be secure while I test files locally if other machines can access them too.

The only solution I can think of is to run a check for the IP address every time the files are loaded and limit it to just my machine. But surely that's not necessary? There must be an easier way!

Forgive me if I'm overlooking something obvious.

Paranoid of England.



10+ Year Member

Msg#: 3605436 posted 5:34 pm on Mar 20, 2008 (gmt 0)

You need to change the configuration file for Apache to only listen to localhost:

open /private/etc/apache2/httpd.conf

change these two lines:

Listen 80


#Listen 80


WebmasterWorld Senior Member 10+ Year Member

Msg#: 3605436 posted 3:45 pm on Mar 26, 2008 (gmt 0)

That's great! Thanks!


5+ Year Member

Msg#: 3605436 posted 7:46 am on Apr 4, 2008 (gmt 0)

You can also check out Mamp. It will allow you to do a sandbox install of Apache, Php and mySql. It's an easy install, and does not require mucking around in terminal.


Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / The Macintosh Webmaster
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved