RFC 2616 (Hypertext Transfer Protocol -- HTTP/1.1) (http://www.ietf.org/rfc/rfc2616.txt
), page 12:
HTTP communication usually takes place over TCP/IP connections. The
default port is TCP 80 , but other ports can be used.
and the '' bit is a reference to RFC 1700 (ASSIGNED NUMBERS) (http://www.ietf.org/rfc/rfc1700.txt
), page 20:
www-http 80/tcp World Wide Web HTTP
www-http 80/udp World Wide Web HTTP
Every protocol has an assigned number. It makes it easier for machines to establish connections with each other. At the machine-connection level, "I want a webpage" translates to "make a connection on port 80 then send an HTTP request". You can do it manually from a terminal:
- Code: Select all
funhouse:~ mike$ telnet info.yawp.com 80
Connected to info.yawp.com.
Escape character is '^]'.
GET http://info.yawp.com/misc/ HTTP\1.1
then press RETURN twice. The server will send you the HTML for that URL.
The 'port 3000' thing is there to avoid port collisions on machines that are already running a webserver for other purposes. We don't want to clobber an existing service in the process of setting up a new one.
On a unix system, only the root user can launch services whose port number is less than 1024, but in most server daemons the root process gives up most of its access privilieges as soon as it opens the port. Ports above 1024 are available to anyone, so when you run a specialized webserver you generally choose a port number somewhere in the thousands.
Port 8000 is the traditional fallback for people who want to run, say, a secure server alongside the regular one, and we don't want to clobber that either.
When you void a product warrany, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.