JavaScript Editor Ajax software     Free javascripts 



Main Page

Figure 1-5
Follow these steps to create and test the virtual host on your machine:
1.
First, you need to add
seophp.example.com
to the Windows
hosts
file. The following
line will tell Windows that all domain name resolution requests for
seophp.example.com
should be handled by the local machine instead of your configured DNS. Open the
hosts
file, which is located by default in
C:\Windows\System32\drivers\etc\hosts
, and add
this line to it:
127.0.0.1 localhost
127.0.0.1 seophp.example.com
2.
Now create a new folder named
seophp
, which will be used for all the work you do in this
book. You might find it easiest to create it in the root folder (
C:\
), but you can create it any-
where else if you like.
3.
Finally, you need to configure a virtual host for
seophp.example.com
in Apache. Right now,
all requests to
http://localhost/
and
http://seophp.example.com/
are handled by
Apache, and both yield the same result. You want requests to
http://seophp.example.com/
to be served from your newly created folder,
seophp
. This way, you can work with this book
without interfering with the existing applications on your web server.
To create the virtual host, you need to edit the Apache configuration file. In typical Apache
installations there is a single configuration file named
httpd.conf
. XAMPP ships with more
configuration files, which handle different configuration areas. To add a virtual host, add the
following lines to
xampp\apache\conf\extra\httpd-vhosts.conf
. (If you installed XAMPP
with the default options, the
xampp
folder should be under
\Program Files
.)
9
Chapter 1: You: Programmer and Search Engine Marketer
c01.qxd:c01 10:38 9


JavaScript Editor Ajax software     Free javascripts 
R7