If Apache was installed before a domain name was registered, or the name of the domain or server has been changed,
we need to make some adjustments. These changes can be made in Apache HTTP
server by editing the httpd.doc file. Find the 'servername' entry in the
file and change it to the appropriate value.
Creating a simple website to test
While this Beginners Guide will not deal with creating or editing web sites or HTML
files for use with Apache, we are going to cover how to create a basic (very
basic) HTML file to serve as your 'home page' for testing Apache. All we
are going to do is fire up a word processor, type a few lines, then save the
resulting document as an HTML file, something most word processors can do
easily. While the resulting file will not do (obviously) for creating
complex websites, it does just fine as a tester to make sure everything is
working fine with the web server.
Open Word or another fairly recent word processing program (WordPerfect, OpenOffice, and even Notepad will do
just fine). Create a new document and type "Apache home page test" or
something similar in the document. Now go to the 'file' menu and select
In the save as window, select the 'file type' dropdown box. Change it
to 'web page' (for Microsoft Word users) or 'HTML document' (for users of
OpenOffice). Save the file as 'index.html' in the following location:
'c:\program files\apache group\apache2\htdocs'. This will ensure that it
is the first HTML document that the Apache server attempts to open when a web
page is requested. You will have to move or delete the other files in the
'htdocs' directory first though. They are the files for the default
'welcome' page and can be safely removed.
This index.html file is a very simple
webpage, which means that anyone who attempts to access the website you've just configured in
Apache will be greeted by it.
Now that you know how to host a basic website with Apache, you can dig deeper
into the documentation yourself.
Apache is available on Linux platforms as well as Windows
(and indeed it originated there), so learning the basics of the program in
Windows will serve well if you ever decide to experiment with alternative
operating systems since the interface is essentially the
If you have any comments or questions, please post them in the PCSTATS Forums. Find out about this and many other reviews by joining the Weekly PCstats.com Newsletter today!
Catch all of PCSTATS latest hardware reviews right here.