views:

55

answers:

2

I would like to write a computer game played by several users sitting in front of different computers. For that I would like to implement a P2P approach.

Now I consider the following situation. I have, let say, 6 computers which build a local network. On every computer I install Apache web server. So, every computer runs a web site. In this context I have several questions:

  1. What will be the web addresses of these web sites? Names of the computers?

  2. Does apache server starts automatically whenever computer starts?

  3. Do I have to install something additional if I want to write "local" web-sites using PHP or Apache is sufficient?

Thank you in advance for any help.

A: 

In my netword I have on my server an apache server. My server is called "server", so I just type in others workstations http://server. Other tip is put in your host files this resolution:

192.168.0.100 server

The IP is just an example, if you have three workstations and want to access them like:

http://machine1
http://machine2
http://machine3

You would have in your host files:

192.168.0.1 machine1
192.168.0.2 machine2
192.168.0.3 machine3

So...

1) Yes, if you set your computers name in your host files like I said above 2) Apache will start automatically if is registered as a service. 3) Yes. Apache is what you need to write local websites using PHP (If you want MySql too, then install it)

Keyne
Sorry, I did not get the answer. You can access you server by http://server, but how other people can access it? And what is 192.168.0.100? Is it just an example? Or it is some special IP address?
Roman
Yes, is just an example. This ip is the ip of each machine in your network. The DNS will recognize when you type http://server and will redirect to your machine, and then apache will get the request.
Keyne
+2  A: 
  1. You could use IPs for these websites on different servers e.g. http://196.168.0.5, or modify the hosts files properly direct to the to the respective IPs, this depends on your OS. On a windows network, you could just use the computer name, e.g. http://computername/
  2. On starting, yes and no. Meaning it can be configured to start automatically, how, again this depends on your OS.
  3. Nope, unless your "local" website, sometimes called intranets, has an application that depends on it.

    Just get a good LAMP or WAMP stack, and you're set.

You will also have to configure firewalls on the servers, this again is platform dependent.

partoa