homepage Welcome to WebmasterWorld Guest from 54.243.13.30
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
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?
Hester




msg:3605438
 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.

Yours,
Paranoid of England.

 

your_store




msg:3606551
 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 12.34.56.78:80
Listen 80

to

Listen 127.0.0.1:80
#Listen 80

Hester




msg:3611148
 3:45 pm on Mar 26, 2008 (gmt 0)

That's great! Thanks!

MarcR




msg:3618818
 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.

Marc

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved