Google Answers Logo
View Question
 
Q: How to set up apache server on WIndows XP machine? ( Answered 5 out of 5 stars,   1 Comment )
Question  
Subject: How to set up apache server on WIndows XP machine?
Category: Computers > Internet
Asked by: tomonok-ga
List Price: $4.00
Posted: 22 May 2003 15:11 PDT
Expires: 21 Jun 2003 15:11 PDT
Question ID: 207452
I have downloaded Apache 2.0.45-win32-x86-no_ssl.exe and installed on
my windows xp, I got it running (so it seems, I can get the index.html
with the http://localhost), I want to know how I can set it up as a
remote server so I can access it from another location. I have DSL but
I am connected all the time, since I never sign off or shut down the
machine, so I am assuming that I have a static IP address? I have
looked into the apache/conf, and found the conf file, it is shown in
the windows directory as a txt file, not he httpd.conf as some web
search result had shown, maybe it is the same? My question is how do I
configure the httpd file so I can access it remotely.
Answer  
Subject: Re: How to set up apache server on WIndows XP machine?
Answered By: errol-ga on 22 May 2003 15:56 PDT
Rated:5 out of 5 stars
 
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.
tomonok-ga rated this answer:5 out of 5 stars and gave an additional tip of: $6.00
Worked first time around! I am so glad that you explained it and not
just gave me a bunch of links from google search results, cause I have
already gone thru bunches of them and did not find what I wanted. It
helped that you also run Windows XP Pro, it gave me more confidence to
your answer. THANKS. The part that said  "Windows will actually say
it's a text file, no need to worry" was doubly reassuring.

Comments  
Subject: Re: How to set up apache server on WIndows XP machine?
From: errol-ga on 23 May 2003 17:43 PDT
 
Thanks for your kind generosity, Tomonok!
It was a pleasure to help you. :)

errol-ga.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy