On 4/24/05, Mike Kear <[EMAIL PROTECTED]> wrote:
> Thanks Jared.  I'm wishing I hadnt fallen for that old "I use Apache
> and it's a piece of cake" rubbish now.   For a coldfusion developer,
> who has never had a lot of involvement with server administration,
> specially in Unix, it's not a piece of cake at all.
> 
> [A]  For example, what is 'UseCanonicalName Off'?

http://httpd.apache.org/docs-2.0/mod/quickreference.html

> 
> [B] Why do I have to have DNS entries for everything if I'm only using
> my local folders, for local access, and nothing whatever to do with
> the internet?  And since I dont have my own DNS server set up on this
> machine does that mean I have to have one now?  Or do i have to add
> entries for all these in an external DNS, which means they wont be
> available when I'm offline, which was the whole point in the first
> place - to set up my dev machine so i can run my dev versions of the
> sites i'm working on.

Because DNS will match the request from the browser (for
http://intranet1 for example) to the machine that's running Apache
(127.0.0.1 for example), so that the browser even knows where to look
for the page! You have to have a host file entry (mini-static DNS-ey
sorta thing) for matching 127.0.0.1 to even get localhost to come up
even.


MS: [windows root]\system32\drivers\etc\hosts or you won't find anything.
Most UNIX: /etc/hosts

Like Chris said (but expanded a bit), make sure this line is in there:
127.0.0.1       localhost {myhostname} intranet clientsite1 clientsite2

Note: {myhostname} is symbolic for whatever your hostname really is.

> 
> [C] And what is this section about? <IfModule mod_userdir.c>

http://httpd.apache.org/docs-2.0/mod/quickreference.html

Note: You CAN have different module definitions on a per-vhost basis...

> 
> [D]  What does this line do:  HostnameLookups Off     I'd have thought
> it does exactly the opposite of what I'm trying to do. But apparently
> not.

http://httpd.apache.org/docs-2.0/mod/quickreference.html

Has to do with logging.

> 
> [E] My apache installation set up the default home page to be at
> C:\Program Files\Apache Group\Apache2\htdocs  and that's where
> localhost lands.   ColdFusion also installed CFIDE and CFDOCs under
> there too, but I dont think that's a very good place to be putting web
> pages of any kind.  I want to move it all to c:\sites.    What does
> that change?    Where is your default home page, and CFIDE and CFDOCS?

There is no "default home page" or a default server... even in IIS,
the "default site" is really just a virtual host that is called
"default" for the sake of ease. In Apache, you have 2 choices... you
can run the "default" server based on the basic, pre-packaged
httpd.conf file. That gives you one server... http://yourhostname:80.
However, if you want to run several "servers" or virtual hosts (or
vhosts) you need to define a vhost entry for each of them.

When you create ONE VHOST, IT SHUTS OFF THE DEFAULT SERVER that would
have normally been at http://yourhostname:80, along with any
resolution that would have happened for things like Directory and/or
Alias directives in the httpd.conf file.

Hence, you will need to have a vhost section in your config file for
any URL you wish to access... http://hostname, http://intranet,
http://clientsite1, http://clientsite2... all will need to have a
vhosts section, and a directory section in order to tell Apache that
it's ok to let browsers access those folders.

These settings, when in default server mode (i.e. no vhosts defined),
are activated via the body of the httpd.conf file... however, when you
define ONE VHOST, they will ALL need to be defined per-vhost:

DocumentRoot
DirectoryIndex
ServerName
ServerAlias
ServerAdmin
Directory
Alias
Order
Allow

Please note: This means that if you have intranet and clientsiteX in
your vhost configs and nothing with a ServerName directive of
myhostname (i.e. your host's hostname), then typing http://myhostname
will, indeed, fail. There is no "default" when using vhosts.

For more info on any of those directives, see:
http://httpd.apache.org/docs-2.0/mod/quickreference.html

> 
> Sorry for being so dumb on this, but every time I think i have it
> worked out, another 50 or 60 parameters emerge that I have no idea
> about and I've never seen before.   Not even in the sample httpd:conf.

Aye, it happens...

> 
> But I do appreciate your efforts on this.  It's a big help to a poor
> old confused developer.

Glad to help.

Laterz!

J


-- 
---------------
-------------------------------------
Buy SQLSurveyor!
http://www.web-relevant.com/sqlsurveyor
Never make your developers open Enterprise Manager again.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204232
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to