Hi there, Tomonok!
I have been using Apache 2.x on a Windows XP Pro machine for some time
now so this answer will largely be sharing the experience I have with
it.
The first, most simple question you raised was if you have a static IP
address.
I very much doubt if it will be static because most DSL and cable
internet providers use dynamic IPs with DHCP (Dynamic Host
Configuration Protocol).
Static IPs also cost a fair amount of money so you would almost
certainly know if this was part of your internet connection package.
However, even though you have a dynamic address just like dialup
modems, you will usually keep the same one for many months because a
DHCP server will always give you the same IP if it is still available
upon the modem/PC requesting it.
For more on DHCP, see the following excellent resource:
http://www.dhcp-handbook.com/dhcp_faq.html
You may have an obstacle though, if your IP does change while you
trying to access your server remotely then you will be stuck.
This is where dynamic DNS services come in.
There are several to choose from, the ones which immediately come to
mind are:
DynDNS.org
http://www.dyndns.org
No IP
http://www.no-ip.com
A quote from the NO IP site explains it very well:
"No-IP Free offers an easier way to others to locate you on the
Internet. If you want to serve web pages, share MP3s, host Quake, or
run any kind of Internet server, you need a name so your users can
find you. It's simple. You choose a name for your computer and we tell
the world where your computer is located. Even better, we also provide
you with a program that notifies us whenever your computer's IP
address changes. Instead of being just a number on the Internet, your
server is now always available by the same easy-to-remember name."
There are only a few things you must double check in the httpd.conf
file (Windows will actually say it's a text file, no need to worry).
Open the file in Notepad and look for these lines (my comments will
have "- - " at the start):
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
- - Make sure that it is set to "Listen 80".
#
# ServerName gives the name and port that the server uses to identify
itself.
# This can often be determined automatically, but we recommend you
specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName
directive.
#
# If your host doesn't have a registered DNS name, enter its IP
address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName ErrolsServer:80
- - Make sure that this is also port 80.
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
- - This should be set as you can see here.
And that's it for the httpd.conf file!
It's recommended that you check the server by typing "http://yourIP/"
into your browser as opposed to just "http://localhost/".
To find your IP, go to the Start menu then Run.
Type "cmd" into the box and press enter.
Type "ipconfig" into the command line windows and press enter.
It will then show your public IP above the "subnet mask" field whic
you will need to know this to access the server externally or when
setting up a dynamic DNS service.
One final thing, if you use the Windows XP built-in firewall on your
connection, ask a friend to try typing in your IP into their browser
to check if they can access it.
If not, disable the firewall and install something such as the free
Zone Alarm [ http://www.zonelabs.com ] instead then follow the
instructions below to enable it for Apache use.
Zone Alarm config:
Double click on the "ZA" icon in the taskbar.
Go to the Program Control tab then Programs and make sure Apache is in
the list with green ticks for Access, Server (trusted and internet).
Next, go to the Firewall>Main tab.
click on Advanced.
Make sure the box titled "Allow uncommon protocols at high security is
ticked" then click OK.
You may also wish to lower the overall security level to Medium
instead of High for the Internet Zone Security.
Close Zone Alarm and you're done.
I hope this helps!
Kind regards,
errol-ga. |