Ok, here is how I do it:
I use a LinkSys Broadband Router in my house, so I can get all my 5 pc's/laps permanently connected to the same FiberLink provider. The public IP is a dynamic one, so it changes with every "reconnect".
I set my development pc (the wamp server host) to have a manually configured IP. All the rest get IPs by DHCP from the router.
Then, in my router settings, under "Port Range Forward" I set all incoming requests on port 80 to be sent/forwarded to my manual/internal IP (eg 192.168.1.101)
I run wamp with "Listen 80" setting on httpd.conf. (open to all interfaces)
At this point, the server is finely accessible from the localhost and WAN / external requests (localhost, 127.0.0.1, LAN IP 192.168.1.101 and WAN IP 82.bla.bla.bla). To make sure your server is well configured and fully running, test all those addresses, by putting http:// in front of each one.
From now on, there comes the trick with a dynamic IP.
As I said, my IP could change every minute, depending on how often does my router/modem reconnects to the provider's link.
You would need to have a static address/domain reachable from internet (outside LAN), anytime. To do that, I personally use DynDNS.org services, which never caused me troubles.
Register on [
www.dyndns.org] site and add+configure your desired host (host names are available in various range of formats like yourname.no-ip.net, yourname.homeip.net, yourname.selfip.com and many others). Choose service type: "Host with IP address".
If your router doesn't accept dyndns services, go and download DynDNS updater from their Support page (https://www.dyndns.com/support/clients/windows.html). That app is a very low resources consumer, it's running in the tray bar and continously monitor your public/WAN IP. Whenever the IP changes, DynDNS updater sends it to your account Host service on dyndns.org site, so your chosen hostname gets registered in their DNS server with the new IP.
You don't really need to understand how all this work, important is that it's working.
As a demo, here is my own pc available through a router to the web: [
ciprianmp.homeip.net]
To summarize, the tricks are:
1. setting your router to forward requests on port you wish from the router to your local IP;
2. Having a DynDNS service registered.
Good luck and let us know if it worked for you.
Ciprian M.
PS: btw... only [
localhost] doesn't work for me, and I couldn't figure out why (but I don't need it anyway...)