3

I'm a web developer and I have a Mac mini (late 2009) that I can leave always on in order to run it as a web server for my clients' sites that I work on (before I upload them to their servers).

Do you know how can I set it up? Unfortunately I have dynamic IP. Basically, I want to access them remotely in order to show them to my clients and edit/develop them using my main Mac or my laptop.

It runs the latest version of OS X El Capitan 10.11.6 and I own macOS Server app v5.2.

3

I am basing my answer what your requirements are

  • Web Development. Developing websites or web apps that typically run off a server; typically Apache/PHP/MySQL

  • Access the server remotely to edit/develop

I belive this is much more than just screen sharing as you don't want to share your screen, just the website you are developing for a client.

You will need the following:

  • Web service listening on the appropriate port
  • Open/forwarded port on your router
  • Dynamic DNS (DDNS) with the ability to update your record

Web service listening on the appropriate port

Typically, when doing Web Dev, this is Apache listening on the correct IP/Port. Assuming that you have just one network adapter, you have to make sure that Apache (or whatever else you are running) is listening so that other computers on your LAN can access it. If you can do this, then you are good to go for the next step

Open and/or forward the port on your router

So, you can get to your service from inside your network, but now it's time to get to it from the outside.

  1. Determine your local IP. Using terminal, issue the command ifconfig en0 grep inet. The line should start off with inet xxx.xxx.xxx.xxx. That's your local IP address
  2. Forward HTTP traffic to that port. There are many routers on the market and each have different user interfaces, but they are all technically doing the same thing: taking traffic bound to your IP and port and forwarding it to an address you specify. You will have to check your user manual for the specifics on how to do this.

    But, basically, you are going to forward port 80 traffic (HTTP) to the IP address you found in step 1.

    Next, you are going to want to test this out. Use a service like IP Chicken or WhatIsMyIP to find your public IP. You can even type the search directly into Bing and have it return your IP address.

    Once you have that, you need to browse to it. A smartphone NOT connected to your WiFi makes a good choice. Point the browser of the smartphone to the public IP address you just obtained. If you can see your page/application, your router is working. If not, you need to go back and make sure your port forwarding is set up correctly.

Setup DDNS

This is the final step. Dynamic DNS allows you to use a domain name to access your IP even though it changes. Many newer routers support DDNS in their firmware - you will need to check with your specific manufacturer and or model.

Even if your router dosen't support DDNS, you are still in luck. All you need is a DDNS client to update your record and it can run on any computer on your network. For example, on FreeDNS's website, they provide a number of different clients you can on virtually every platform from Windows, to Linux and even iOS.

So, what you will need to do is install one of these clients on your Mac server so that it can periodiocally update your DDNS record

  • Thank you very much, Allan! That's exactly what I wanted. It's a bit slow but it's ok. 😀 – Isidoros Rigas Nov 6 '16 at 14:42
  • I have the same thing...it's good if one or two people are accessing the server, but when more than that are uploading changes simultaneously, my home Internet connection comes to a crawl. – Allan Nov 6 '16 at 16:23
0
  1. Sign in to iCloud on the Mac mini
  2. Enable back to my Mac mini
  3. Fix any warnings or errors that are listed (it will prompt you to enable remote screen sharing if you haven't done that already).
  4. Sign in to iCloud on your Main Mac with the same iCloud account

The Mac mini will now show up in the Finder sidebar as a shared computer as if it were on your local network. Setting up server app is a little more steps, so that's really better as a specific and separate question. The above steps will get you screen sharing so you can then set up server if / how you want.

  • Thank you for your prompt answer! I already do that but my laptop runs Windows so I can't access it while I'm out of office. Is there any way to make it work like a normal web server? Maybe using No-ip? – Isidoros Rigas Nov 4 '16 at 13:38
  • @IsidorosRigas Apple makes it free and easy, but you could use any of the other dynamic DNS as a service providers. They load software on the Mac mini to update the DNS. No Ip would be a fine place to start. – bmike Nov 4 '16 at 20:26
0

Are you able to get a static IP on the server?
If so, just go on the Mac - AppleMenu>SystemPreferences>Sharing.. Set Screen Sharing ON (recommend for Admins), turn on Remote Login, and then using the Server App allow remote SSH..

At this point just use RealVNCVier - > https://www.realvnc.com/download/viewer/

Here's a handy guide for doing it both ways....

http://www.howtogeek.com/214220/how-to-access-your-macs-screen-from-windows-and-vice-versa/

If you don't have a static IP on the server, you're going to need to use iCloud or get a dynamic DNS (dyndns.com is your friend)..

  • Screen sharing is so much easier with Chrome Remote Desktop. Thank you for your answer, Frank, but Allan covered me. :) – Isidoros Rigas Nov 6 '16 at 14:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .