Host a site on a Mac
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 –&gt; host-ip:private-port


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



All requests to 201.23.45.23:80 and 201.23.45.23:443 are forwarded to your internal host and its respective ports then: 192.168.0.2:80 and 192.168.0.2:443.

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:



This means: all requests to 201.23.45.23:80 will be forwarded to 192.168.0.2:8888 and 201.23.45.23:443 to 192.168.0.2:8890 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:





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 &amp; MAMP and run it there.

This will prevent ravaging your real system.