httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Haneda <>
Subject Re: [users@httpd] Can you recommend some virtual host tutorials?
Date Fri, 07 May 2004 06:57:52 GMT
Perhaps you could post only one topic and not be all over the place, you
have several emails, all related, why not keep it all in one thread?

on 05/06/2004 09:47 PM, David Blomstrom at wrote:

> Holy cow, I thought this was supposed to be a simple
> procedure, but Apache's documentation is extremely
> confusing! I've pieced parts of the puzzle together by
> asking questions on this newsgroup and several other
> forums.

Apache's docs are fine, you are just trying to learn too much at once.  You
don't seem to understand the basics of DNS, which is what your problem is,
this is not a Apache problem, or a problem with Apache docs, it is a problem
in that you do not understand DNS.

> I've accomplished three things so far:
> 1) I opened the file
> C:WINDOWS/systeme32/drivers/etc/host and changed it so
> it looks like this:
>       localhost

We really do not need to see your hosts file in full, probably most wont
want to see it at all.  At any rate, we would just need the important lines.
There is nothing special going on in this file, it is just mapping hostnames
to IP addresses, just like the entire internet does.  You have local DNS,
provided by the hosts file, and remote DNS, provided probably by your ISP,
when you type in your computer consults the hosts file, since
there is no entry for it consults your ISP's DNS server, which in
turn returns a IP address and send you to the site.

> How much latitude do I have in creating these names?
> Could I replace with
> geosymbols.mycomputer or just "geosymbols"? And if I
> want to change more websites to virtual hosts, I'd
> just do this, right?:
>       localhost

As much as you want, you could in theory do this:

Now, anytime you type in you will be requesting your own machine,
so you could if you wanted, develop your sites under the domain
name, not that you would want to, I am just illustating what you can do.

So at this point, so far, there is nothing wrong with Apache, this is just
DNS stuff that you need to learn.

I really don't know why you are going through all this trouble, if you are
not planning on running a website on your own, this really does you no good
to fuss with all this, get a 9.00 a month php and mysql account and never
look back.

> 2) I opened my Apache httpd file and changed
> #NameVirtualHost to NameVirtualHost *
> That just clears the way for creating virtual hosts -
> it won't affect my other websites, right?

More or less, yes, you can bind a certain virtual host to a certain IP
address, that is beyond the scope of what you need to know.

> 3) In the httpd file, I plugged in the ServerName I
> created:
> #
> # VirtualHost example:
> # Almost any Apache directive may go into a
> VirtualHost container.
> # The first VirtualHost section is used for requests
> without a known
> # server name.
> #
> #<VirtualHost *>
> #    ServerAdmin
> #    DocumentRoot /www/docs/
> #    ServerName
> #    ErrorLog logs/
> #    CustomLog logs/
> common
> #</VirtualHost>

I already have a copy of the virtual host examples, I really don't need to
see them again :-)

> <VirtualHost *>
>   DocumentRoot c/sites/geosymbols
>   ServerName
> </VirtualHost>
> Now I'm just trying to figure out what to type in for
> a DocumentRoot. I checked Apache's documentation and
> several tutorials, but I don't see anything that
> applies to my situation. c/sites/geosymbols is my best
> guess so far.

Are you serious?  I never have used Windows before, I have no idea how the
windows paths work, on unix it is /Path/Path/geosymbols, I did one google
search for 
+apache+DocumentRoot++&btnG=Search>  The first link shows:
 DocumentRoot "C:\Documents and Settings\Admin\Desktop\www"
So I would bet you need to use:
DocumentRoot "C:\sites\geosymbols

Just a guess, I really have no idea, it is really up to you to know how your
filesystem finds files, not Apache or the docs.

Your situation is not unique, just post a message asking "what is the
correct way to define a path for doc root in apache on windows".  You would
get a number of correct answers I bet.

> When I figure it out, I can just repeat the procedure
> with other sites, like this - right?:


> And when everything's squared away, I can restart my
> computer, and geosymbols and geoworld will be
> converted to virtual hosts, which will function pretty
> much as before, but they'll allow me to use site-root
> relative links that will work both on my computer and
> online?

That depends on how you code your HTML or whatever, but more or less, yes.
Scott Haneda                                Tel: 415.898.2602                       Fax: 313.557.5052                            Novato, CA U.S.A.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message