Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   Make a webserver with my computer (http://www.programmingforums.org/showthread.php?t=10260)

demon101 Jun 9th, 2006 4:10 AM

Make a webserver with my computer
 
when i go to do this do i have to have a website to use?

i am wanting to do this but dont know where to start at.

Ooble Jun 9th, 2006 9:22 AM

If you're hosting it on your own computer, just type your computer's IP address into the address bar. It's 127.0.0.1. You can also use "localhost", which is usually used as a pseudonym for the above IP.

a thing Jun 9th, 2006 5:46 PM

http://athingis.boldlygoingnowhere.o.../webserver.php

splinter9x Jun 9th, 2006 6:16 PM

Do you have a webserver downloaded on your computer? That would be the first step.

lectricpharaoh Jun 9th, 2006 7:28 PM

Quote:

Originally Posted by demon101
when i go to do this do i have to have a website to use?

i am wanting to do this but dont know where to start at.

You want to run a web server? Well, first you decide on a web server. There are free ones out there, like Apache and Tomcat. Then you download and install the server software on your computer. Once that is done, you configure it (they have directions, and many have an out-of-the-box configuration that will at least show it works.

Now, if your computer is connected to a network (internet or otherwise), other computers should be able to enter your computer's IP address, and see whatever start page you've got set up (probably something like "If you're seeing this page, you've successfully installed <web server name here>").

Now, a few points. First, you will need to ensure there is a clear path to your computer. If you're behind a firewall, you'll need to open the port(s) you're using (default is port 80 for HTTP). If you're behind a router (including the 'gateway routers' popular for sharing broadband internet connections), you'll need to enable port forwarding
on the port(s) you're using. The reason you don't have to do this for outgoing connections is because the router 'knows' that your end is initiating it, and lets it go through, but when another computer tries contacting yours, the router needs to know which computer (on the local network behind the router) is to receive the incoming connection. If you use a router, you'll also need to give out your router's IP address, not the address of your actual computer (as this will be a local address assigned by the router, and only valid in that context).

Should you not have another computer, or should you not want to give out your IP at this stage, you can still test your site by using the loopback address. This is 127.0.0.1, as Ooble mentioned. Using the default name 'localhost' also works. However, this is not actually your computer's IP address. It is a reserved address a machine can use to reference itself (usually for diagnostic/testing purposes).

Finally, if you want to actually have your site hosted on the net, rather than hosting it from home (where it will be down whenever your computer is off, disconnected, or otherwise offline), you will need to find a web hosting service. You will probably also want to register a domain name, and associate that name with the IP address of your site, as determined by your web hosting service. Many hosting services will handle this for you, but if you don't register a domain name, then people will need to use IP addresses like 'http://64.233.187.99' rather than 'http://google.com'.

splinter9x Jun 9th, 2006 7:30 PM

I use Apache, I would aslo recomend it just becouse of it ease of use and it is quite powerfull.

demon101 Jun 9th, 2006 11:22 PM

Quote:

Originally Posted by splinter9x
I use Apache, I would aslo recomend it just becouse of it ease of use and it is quite powerfull.


well i dont any much about apache but i will try to find a download for it.

demon101 Jun 9th, 2006 11:28 PM

i have got everything but the router thing. how you was saying that about broadband connections. i have aol broadband. so what i do to let other people get to see the page?

Wizard1988 Jun 9th, 2006 11:53 PM

You might also want to check out http://www.no-ip.com/

It offers free dynamic dns, in case your ip changes each time you reconnect. And instead of using your ip address you can use an address which doesen't change.

lectricpharaoh Jun 10th, 2006 2:13 AM

Quote:

Originally Posted by demon101
well i dont any much about apache but i will try to find a download for it.

Try here. Also try here in the future. :)
Quote:

Originally Posted by demon101
i have got everything but the router thing. how you was saying that about broadband connections. i have aol broadband. so what i do to let other people get to see the page?

You have an IP address assigned by your ISP. Since you have broadband, it's probably fairly static, but occasionally they do change, at least for me (I've got cable). Anyways, you use this IP address to communicate with other computers on the internet.

About the router thing, you only need to know about that if you have a router. If you do, you need to check your router's documentation for how to enable port forwarding, and you'll need to ensure you have a static local address (ie, that your router gives your computer the same address each time you power on). If you don't have a router, you don't need to worry about any of this.

One final note: if you plan on actually using your computer to host, you might want to check your ISP's terms of service. Sometimes, hosting a server violates these terms. Even if it doesn't, many ISPs have traffic limits, and if you exceed them (for example, by letting people download large files from your computer), you might find yourself cut off for the remainder of the month, or worse, facing heavy fees for the surplus traffic. Even aside from all that, bear in mind most consumer DSL and cable services are asymmetric (bandwidth for upload and download are different), with download bandwidth being far greater than upload bandwidth. This means anyone downloading large amounts of content from your computer will be doing so at speeds far less than you can download stuff.


All times are GMT -5. The time now is 8:07 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC