Can I enable Web Sharing... without sharing?

Discussion in 'Web Design and Development' started by davidje13, Jun 2, 2008.

  1. davidje13 macrumors member

    Joined:
    Dec 4, 2007
    Location:
    Warwick, UK
    #1
    Hi,

    I want to make a simple sandbox on my mac for testing scripts using localhost, but I don't want it available to the network or internet. Is this possible?
     
  2. hayduke macrumors 65816

    hayduke

    Joined:
    Mar 8, 2005
    Location:
    is a state of mind.
    #2
    Sure. Just publish your HTML to any folder and point your favorite browser to the file location (eg file://Volumes/Users/...).
     
  3. davidje13 thread starter macrumors member

    Joined:
    Dec 4, 2007
    Location:
    Warwick, UK
    #3
    sorry, I didn't mention. The scripts are PHP scripts.

    (also, I've enabled the default PHP already)
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    One way would be to edit the Apache configuration file httpd.conf to only allow from localhost. Also, if you have a router it can block the traffic.
     
  5. davidje13 thread starter macrumors member

    Joined:
    Dec 4, 2007
    Location:
    Warwick, UK
    #5
    I don't actually own the router (I'm on a university network) and the main reason I want to prevent it being available on the network is because the IT department doesn't allow "any machines running server operating systems or services e.g DHCP, DNS, web servers etc".

    So would only allowing from localhost prevent it from interfering with the network entirely? if so, how do I do this? (In my quick scan of the httpd.conf file I can't see anything to do with access)
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    Search for a line that starts with "Listen" Then you can set it for 127.0.0.1:80 or localhost.

    The university should have no problems with this at all.
     
  7. davidje13 thread starter macrumors member

    Joined:
    Dec 4, 2007
    Location:
    Warwick, UK

Share This Page