Is it possible to use my public IP address to serve a website? (Catalina) I'm a bit new to the topic of servers, ip addresses (public and private), ports, networking, and how all of this stuff ties together.
Playing around, I managed to run apache on my mac and get an html page up and running on localhost. I typed my private IP address into another device and I was able to see this page.
If I understand correctly, a private IP address is an IP address that's specific to my &quot;local network&quot; which I assume is anything connected to my wifi.
Is it possible to make a webpage that is served from my mac and visible from devices not connected to my local network? I expect to be able to type my public ip address into a URL bar and see this page.
I am aware that there is an app from the App store related to this topic, but I feel this should be basic functionality that can be done from the Terminal (correct me if I'm wrong).
Thanks for the help!
Much will depend on your network set-up and is beyond the scope of a single answer.
Try with my Miln Beyond application to confirm your primary outgoing IP address, and if a NAT or UPnP device is on your network. This is to test if the devices are configurable and your network is truly publicly accessible.
Use Beyond's Beyond Network window to see your computer and network's assigned IP addresses:

Do you have another computer or device on a separate network, such as a mobile phone with a data (non-wifi) connection? Use this second device to test access to your server. Testing access using the same network can provide misleading results.
If this works, then you can achieve the same via the command line and Apache httpd.
Unverified Address
You commented:

Unverified potentially accessible address. Provided by local Network Address Translation (NAT) or Universal Plug and Play (UPnP) device.

An &quot;unverified&quot; address is potentially accessible from the Internet. It is unverified only because Beyond has not actively checked it (that requires a membership).
The listing also suggests that your router supports NAT or UPnP to open external ports and allow incoming traffic.
Does your Internet router have a web interface? The router is a device often supplied by your Internet Service Provider (ISP). If so, look for NAT or UPnP settings; these may also be called Port Forwarding.
By default, your router should block incoming traffic from the Internet into your network. To offer a server to the wider Internet, your router needs to be told to accept specific incoming traffic and to pass it to the server inside your network.
For short lived servers and services, like video/voice calls, NAT and UPnP are used. This is what Beyond has managed to do on your network.