I have

my website locally on my Mac ready to host. It is accessible locally via http://localhost running on MAMP. Let’s say my static public IP from my ISP is : and I’ve already linked that IP with a domain like this : —> http://mysite.online


I want to make my site accessible on the web, and host it on my local Mac. I want my clients to see what I see on my http://localhost when they visit




I know that I can purchase a VPS or shared host, but the my intention here is to learn how to do it on my own on my local machine.


Do I need to update my router to open port 80 and configure a port forward for that port? Do I need to download an extra FTP server app like FileZilla to configure this ?

How would one go about and configure something like this ?

Any hints/suggestions/directions on this will be much appreciated !

closed as too broad by Allan, nohillside Aug 16 '16 at 5:36

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • The first thing is for sure to have port 80 enabled and your router should forward it to your Mac that's hosting your web application as someone has to tell your user from the outside who his host is – Pinchus G. Aug 16 '16 at 0:33
  • Ok. I can do enable my port 80 on my Mac that hosting the application. But is that it the involvement of all of theses ? No any other app needed ? – kyo Aug 16 '16 at 0:35
  • This question, IMO, is way too broad for this format. My suggestion is to get a basics of how a web server works by vewing some videos on YouTube as a primer. Once you have the basics, you can begin to refine your questions to something a bit more manageable. – Allan Aug 16 '16 at 0:36
  • 1
    Not if you could already access it locally – Pinchus G. Aug 16 '16 at 0:36
  • I'm a web developer myself. I'm pretty sure. I'm close, and I've deployed sites before on VPSs, but I've never done that before. I've a feeling that I'm missing some networking configurations direction :( because I'm not good at it - yet, that's why I decide to ask this question to seek a bit more hints. – kyo Aug 16 '16 at 0:39

Usually you don't need any additional tools like FTP-clients because you already have direct access to your file system via the Finder or the shell.

Since your host resides in a private network and connects to the internet via a gateway (your router) remote users don't have direct access to your Mac - they don't even know that it exists.

To enable access for remote users, you have to forward the public port 80 (and possibly port 443) on the router to the respective host's ports. Usually the router interface already contains preconfigured port-forwarding rules or you have to add them yourself:

public-router-ip:public-port –> host-ip:private-port

Here is an example of a D-Link router interface. Here I assume your host has the IP and your web-server has the ports 80/443 open, the router's IP is

enter image description here

All requests to and are forwarded to your internal host and its respective ports then: and

Name is here: a human readable name tagging the service. This may be the protocol name (e.g. HTTP) or a service name (e.g. Web server (http)). The drop down menu Application Name will probably auto-populate it - I don't own a D-Link Router so I don't know this.
In IP Address enter the IP address of your local Mac hosting the web server - not your public IP. The drop down menu Computer Name will probably show all available hosts in your internal network.
Public/Private Port as well as Traffic Type are self-explanatory.

The designations may differ slightly in your router's interface!

The standard MAMP http/https ports are 8888 and 8890 though. If you haven't changed this, the proper port-forwarding rules on the router would look like this then:

enter image description here

This means: all requests to will be forwarded to and to respectively.

You may even tell your clients to access the web server at port 20080/20443 (e.g. mysite.online:20080/main.htm). This is not recommended and inconvenient for your clients - it's just an example to show how to do it.

The forwarding rules with the standard MAMP http/https ports are then:

enter image description here

If you want to operate your own web server like this, I advise to set up a virtual machine (connected to a bridged interface - not NATed!) with VirtualBox, VMware Fusion or Parallels, install OS X & MAMP and run it there.

This will prevent ravaging your real system.

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