The question is, how can I access these files from outside my network, effectively serving the website on this machine? Can it be done while the server is behind my router? The router is a D-Link DI-524 and I have set the HTTP(TCP 80/80) "Virtual Server" in the router configuration to 192.168.0.150 . Should I use a switch to split the connection from the ISP to my router and the server? Can this serving be done without my registering a domain name?
Steps to contact your machine from the outside world:
Forward the desired port in the router/gateway/NAT device (sounds like you've done this already)
Find the external address of your machine. Unfortunately, with most ISPs this is dynamic (more about resolutions to this later). Here's a diagram for exactly what I'm talking about:
You know the interior address (192.168.0.150), you can find out the external address (that known by the router and the modem, X.X.X.X) by going to the following site: http://www.whatismyip.org/.
Once you know the address, you can check by going to the address. Say WhatIsMyIP says it's 18.104.22.168, you'd open a browser and goto http://22.214.171.124/index.htm.
Now, that address changes but you'd like to always be able to get to the server, you can try out various dynamic DNS services, they provide a client that you run on the server (your machine) that updates the DDNS servers as to what your current external address is, allowing you to have a nice name attached to your machine.
This should be a good start, but be sure to read guides on securing your machine and patching utilities to make sure your server is secure from cracking attempts.
Thanks for the reply. Although I had set up forwarding with the Virtual Server, I wasn't aware that my ISP would block port 80, 21... so I had to change the public ports on the server to 5080, 5021... and used DynDNS to hide the ip behind a name.