to setup your own HTTP server
by Joe Janson,
Project lead at Omega Unfold Inc
It is easy to get a normal
accessible to get a site with a database.
interesting to know that it is simple to setup a web server at home.
are a bunch of reasons why a home web server is useful. You may need a
site that provides a live webcam, or a site that provides files
generated on your computer. You may simply want your own webserver at
home, no strings attached.
short document, I'll show how to setup your own HTTP server, your own
custom WWW node on the net.
Things you should know about internet networking:
local network is how we call your home or office network, where one or
many computers are connected to a router. The router is the
doorway to the internet.
computer on a network has an IP address. This also applies to
devices like iPhones/iPods, printers, routers...
On a local network the IP addresses often look like 184.108.40.206,
these are called "internal addresses".
"external address" is the IP address given by the Internet Service
Provider, it is a unique identifier that allows computers on
internet to connect together. The router on the local network receives
this address and dispatches internet communications between the
computers on the local network and the internet.
computers on the local network are protected by the firewall on the
router; a computer from the internet cannot connect to a local computer
unless the local one has contacted it first, or unless the firewall
specifically allows incoming access from the internet to this local
computer (this is usually called "Port Forwarding" in the firewall
IP Port is virtual plug on a computer, each plug is identified by a
number from 1 to 65535. When establishing a network connection, we need
to specify the port number. Some ports number are pre-defined, for
example port 80 is usually bound to http and is always set by default.
However, it is possible to set a server to use any port number, in
which case the client will have to overwrite the default behavior by
specifying the correct port in the URL.
|Using a web browser, entering a
normal address will connect you to the default port 80
But specifying an alternate port is possible as long as the server has
activated this port
Step 1: Choose you server software
most important thing when setting up a personal server is the software
that will be providing the service, the rest is just configuration.
Some famous software are Microsoft IIS and Apache, but you'll often
find simpler web servers embedded in programs like our ownWebcam
the case of Webcam Zone Trigger, installing the software is as simple
as opening the installer. Since the http server is an optional feature,
you'll need to start it by going to the Setting menu, HTTP section, and
check "Use http". The default port is 80, you can change it if you
want. Click on OK and the server will start. It really isn't a big
deal, the server is silent and requires very little resources.
ISP block incoming connections to port 80 as a security measure. Using
another port number may be necessary in this case.
it is setup, you can test your server by connecting on it locally. Here
is an address that you can enter in a web browser to loopback on your
You can also loopback by using the local IP
address of the computer.
firewalls prevent you from using your external IP address from inside
your local network. As a rule of thumb, use local IP addresses
connect to nearby computers, and use external IP addresses for
connections over the internet.
How do I find
what my computer's local IP address is?
you have Webcam Zone Trigger installed, go to the
menu, HTTP section, the local address will be written there.
If you do
not have Webcam Zone Trigger, follow these steps:
to the Windows Start menu, then Programs, then Accessories
This will open a black text window.
- type ipconfig and
are looking for "IPv4 Address".
may have many network adapters on a single computer, some of which
may be un-used. If you are not sure which is the correct address, try
Step 2: Open the firewall
the server software is running, we need to make sure that it can accept
incoming connections from the internet. There are 2 things to verify:
software firewall and hardware firewall.
firewalls are optional. Since XP sp2, Windows comes with a software
firewall, it is quite basic and can be deactivated. If you have an
anti-virus or an internet security package, you might need to check it
out to make sure it will allow your server to work correctly. It is
likely that when you start the server, the software firewall will
pop-up a dialog box asking you how to proceed about the security. Most
of the time you simply need to grant permission for a software to
access IP networking; make sure your http server software is in the
firewalls offer much better security by shielding local computers
the firewall on your router is usually done with a web browser by going
to http://192.168.0.1 or http://192.168.1.1 (see
your router's manual).
will need the user name and password to log in the router. On most
routers, the default username is usually something like "Admin" with no
password, if this is the case you should change the password yourself.
for a page with "Port Forwarding" or "Redirection" features,
sometimes in the Advanced Settings section. You are looking
page where you can tell the firewall that any incoming connection to
TCP port 80 (or other custom number) should be directed to a computer
on your local network, so you'll need to specify the server's local IP
you specified you want to use a static IP address for your computer on
your local network, the router will usually allocates IP addresses with
numbers in the order that the devices where turned on. This means that
if you have many devices on your network, they may be assigned
different local IP addresses than the last time they where used.
this is done, your http server should be available to the world. Now
all the world need is a link or a URL to find your server...
Step 3: Finding your server on
simplest way for someone on the internet to access your server is to
enter your server's external IP address directly in their web
browser. Here are a few ways that you find what is your external
on your router's Status page, it should be on there. You can usually
access you router by going 192.168.0.1 or 192.168.1.1
a web browser, go to a site where they provide this info for you, for
example ipchicken.com or ip.zonetrigger.com
Webcam Zone Trigger, go to the Settings menu, HTTP section, there is a
button that will query and provide you with the external IP.
How to get
a domain name for your
now and then your external IP address will be renewed, you never know
exactly when. If you need a reliable way to access your computer
despite this caveat, you should get a dynamic domain name. Here is how
you do it: go to a dynamic domain provider likedyndns.com or no-ip.com, register
for an account (some are free) and install the dynamic update client
software they provide.
All is done
and ready, your http server can now be used by people on the internet
with normal web browser.
As a closing note, here is a description for the standard formatting of
that we want to connect to a site supporting the Hyper Text
Transfer Protocol. This part makes it clear that we are requesting a
website rather than entering a search term.
- In case you need to login on the website, it is
possible to include the login info in the URL this way.
- This is called the sub-domain, we usually find
WWW here but it can be anything allowed by the server software.
- This is the actual domain name.
port number on which to connect on the server. When using http, the
default is 80 and does not need to be specified. How ever, if you are
aware of an alternate port number that you can use, you can specify it
in the URL this way.
- The server usually has a folder/file structure
that you can access. To get to a file, we need to enter it's path on
file to retrieve. Note that a "file" can be an abstract term, as some
servers provide virtual files and PHP scripts that change and adapt to
- You rarely need to enter parameters yourself,
they are usually added automatically when sending form data or
navigating on a more complex site.
In case everything does not magically work on the first try, here are a few things you should try:
- Make sure the port you are using is not already used by another software. The HTTP default port is 80, but any number can work. Try changing it to 8080 or 8888 or something. Make
sure you also make the change on your firewall, and make sure you add
the port number to the URL when remotely connecting to the computer.
- Turn off the Windows Firewall (from the Windows control panel.
- Turn off any anti-virus firewall.
Detection software download site
Download a free copy of the Zone Trigger software.
- Dynamic IP address provider
- Dynamic IP address provider
domain name to a home dynamic IP address.
you have questions about the Zone Trigger products or if you require
consultation and advice on your computer vision projects, please
contact Omega Unfold's technical support: firstname.lastname@example.org
to motion detection and video capture
to setup a home HTTP server
3 things to check for better motion
Digital Signage How-To