5 Replies Latest reply: Apr 9, 2013 7:22 AM by Hamish B.
Hamish B. Level 1 Level 1 (10 points)

I want to set up my MacBookPro as a local web server using Mountain Lion Server.

 

I used to do this with OS X Server 10.4 or 10.5, then went to hand editing the httpd.conf file by hand (for virtual hosts) then went to MAMP Pro.

 

I am now back with Mountain Lion Server 10.8

 

I think I need to make sure the host is configured properly, not sure about DNS, and not too sure about Web Services.

 

Say I want to configure a domain, test.dev, for local testing. 

 

How would I configure this?

 

Have read mulitple sites, but nothing tells me this exactly.

 

thanks

Hamish


MacBook Pro (17-inch Early 2009), Mac OS X (10.7.4), 128 GB OCZ SSD + 60 GB OWC SSD
  • 1. Re: Hosting local development website
    Simon Slavin Level 4 Level 4 (1,395 points)

    Can you connect to your MBP using its correct numeric IP address ?

     

    Can you connect to it using the DNS address ?

     

    Do you have an additional domain already set up and pointing to the numeric IP address ?

  • 2. Re: Hosting local development website
    Hamish B. Level 1 Level 1 (10 points)

    I have given my MBP the host name blair.com.au (I own this domain name) but its not pointed at my machine or anything via DNS (I am trying to make an internal test machine).

     

    I have given the MBP a fixed IP on the local WiFi network of http://192.168.1.50

     

    I can access the 'Welcome to Server' page via http://192.168.1.50 (My Documents, Wikis etc)

     

    I can access a local website (just the 'Welcome to Server' page) via blair.com.au (its the default website).

     

    I don't have DNS turned on.

     

    Over to you, Blue Leader!

  • 3. Re: Hosting local development website
    Hamish B. Level 1 Level 1 (10 points)

    PS I think I have managed to get phpPGadmin working by editing the LaunchDemon file as per

    http://mactasia.co.uk/revisited-using-postgresql-in-lion-server 

     

    Needs to listen on 127.0.0.1

  • 4. Re: Hosting local development website
    Simon Slavin Level 4 Level 4 (1,395 points)

    With that setup your server should work privately, but not be accessible from outside your network.

     

    The 192.168.x.x range is a range of private IP addresses.  This means that everyone who sets up a network can use any addresses in the range for their own purposes.  Nobody outside their private network will be able to access computers at those addresses.  You would use such addresses for devices like internal routers or printers which you didn't want outside people to access.  That setup should work fine for a test setup.

     

    Your Server.app GUI should tell you where on your disk the welcome page is stored.  You should be able to use it to instead point the site at another folder containing your own files representing your own web site.

     

    Later on you will want to make your web site publically-accessible.  blair.com.au actually points to 124.149.16.231.  That address is a public one: people from anywhere on the internet should be able to access a server at that address.  There's no web server at that address.  Assuming you do actually have the rights to that address, you need to change the DNS address of your server so that this is its actual address.  You can do this using System Preferences (changeip was recommended for earlier versions of the Server OS but is no longer needed)

  • 5. Re: Hosting local development website
    Hamish B. Level 1 Level 1 (10 points)

    Thanks - understand internal vs. external DNS.

     

    I used to run a webserver at home; whilst I had a dynamic IP I used DNS update to tell zoneedit what my IP address was, and it worked fine.

     

    Managed to get phpPGadmin and Joomla up and running (needed to add 127.0.0.1 to address postgresSQL listens to in the LaunchDaemon).