Host PHP server on Home PC and share with Friends - Windows

3

I want to share my PHP App running on WAMP with my friends from my Home PC,
Is there any way?

As every PC has an unique IP Address can that be used in any way to act like a server [a tiny one]?

Sourav

Posted 2011-06-04T02:11:27.177

Reputation: 577

1

Read the FAQ, please. ServerFault is for professional sysadmins. This will get automatically migrated over to SuperUser, so please do not post a duplicate question there.

– EEAA – 2011-06-04T02:29:01.387

By default, in a typical home environment, all computers have a unique IP, what is important is whether they are public or private and if they are static. Chances are you just need to set up port forwarding on port 80 to whatever computer is running WAMP and your friends can then connect to your public IP to see your PhP app. – MaQleod – 2011-06-04T03:24:08.953

Answers

1

  1. Register a domain name (it's about $10/year). I would use Namecheap over GoDaddy.

  2. You are probably on a "dynamic" IP address which can change day-to-day (vs a static IP which does not change). You'll need to get a Dynamic DNS client from someone like no-ip.com, then set your domain's DNS to use the no-ip's nameservers, and run the no-ip client on your system which will sync your domain name with your changing IP address.

  3. You'll need to "port forward" port 80 WAN (outside) to LAN IP of system, that way requests coming in are forwarded to your system... But you only have to do this if you have a router.

  4. Windows has a Firewall application that will block incoming port 80 (the HTTP port). You'll need to unblock that port.

  5. There are different WAMP packages. Some are better than others. WampDeveloper Pro is the one I use. It's commercial grade designed for production. Some of the others that are free and mostly for testing are Xampp and WampServer.

rightstuff

Posted 2011-06-04T02:11:27.177

Reputation: 221

3

You could set up a lightweight webserver package for Windows like xampp. Then, you can configure xampp to be accessible to outside devices (by default it only responds on localhost, but you can change that easily in its settings interface). You'd then need to configure your router to forward port 80 to the correct computer, if you have a router.

Edit:
This question here on SU also have a lot of information: What is port forwarding and what is it used for?

jcrawfordor

Posted 2011-06-04T02:11:27.177

Reputation: 15 203

how to do these steps configure your router to forward port 80 to the correct computer, ? – Sourav – 2011-06-04T05:11:48.540

This depends on your particular router brand and model - there are a lot of guides at http://portforward.com/.

– user55325 – 2011-06-04T05:17:14.237

If you follow the link... it's a link to portforward.com. – jcrawfordor – 2011-06-04T06:01:25.170

Haha. I can't believe I forgot to link to that other question. I wrote half of that answer. >.< – jcrawfordor – 2011-06-04T19:58:22.810

2

Try localtunnel or showoff.io -- they were designed for exactly this purpose ("the easiest way to share localhost web servers to the rest of the world").

Russell Davis

Posted 2011-06-04T02:11:27.177

Reputation: 1 124

1

You can install Xampp on a separate box. Set the IP address as fixed like 192.168.1.200 . Then the other local computers can use it. In the browser address line put 192.168.1.200 . Here is a link to the Lite version. http://download.cnet.com/XAMPP-Lite/3000-10248_4-75157363.html

Joe

Posted 2011-06-04T02:11:27.177

Reputation: 182