Beginner's help with Apache installation

i apologize for the comment. i need more knowledge of the whole structure.

i didn’t stuff my virtual hosts in a docs directory which doesn’t exist and i should not be concerned about. i think apache handcuffed me.

127.0.0.1 is already listed in the host dir in windows.

would an intro book on apache help? i’m stumbling around in the dark. i guess i was naive to think this would go as easily as the book implied.

frustrated but determined, thanks again, phil

i edited the virtual host block to just funstuff

i changed the docroot path to “C:/Program Files/Apache Software Foundation/Apache2.2/htdocs”

all seems to work fine now. the “today” script works now.

was it just the path thing? why did apache install, create a path that didn’t exist?

still a bit confused, but moving onward.

thanks again for your help and encouragement, phil

shared my sofa with more than a few surfers from NZ. nice folks all.

phil,

Frustrated, eh? It DOES get easier!

Actually, I’d learned a LOT from Kevin’s first edition so I recommend that you go back and read, take notes, then retry.

Okay, my comment about the docs directory is based on the simple fact that it’s supposed to be for APACHE documentation (or so I must presume). The htdocs directory is where the default “webspace” is located. It’s only by changing settings within the httpd.conf file that you can change this and the most common way is to uncomment the httpd-vhosts.conf file’s include statement and CREATE a VirtualHost on your test server. For example, in my httpd-vhosts.conf file, I have (for example - there are 20+ of these!):

NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
ServerName arj
DocumentRoot W:/ARJ
ServerPath W:/ARJ
</VirtualHost>

… for one of my clients’s sites replicated on my test server.

THEN, in the C:\Windows\system32\drivers\etc\hosts file, I have:

127.0.0.1 arj

All I need to do to access the arj “localhost domain” is type arj/ in my browser’s location box and up it pops!

Another book on Apache? I’d say not. It’s a “simple” tool that you really don’t need to get into to use effectively. IMHO, Kevin laid it out (although I needed to make notes because it wasn’t {originally?} laid out in a 1, 2, 3 manner - albeit close) so you don’t need to do any more (except, of course, enable mod_rewrite which I find to be an invaluable tool - but look to my signature’s tutorial when you get that far).

Please DON’T give up! Apache is a wonderful tool and any combination with PHP and MySQL works a treat!

Just keep asking questions and we’ll get you where you want to be!

Regards,

DK

when you say “partition”, do you mean just a different directory on your C: drive?

can i put my site anywhere and edit the “documentroot” path to point to that directory?

can i add additonal virtual hosts just by naming them and pointing to them with the directoryroot path?

thanks, phil

Phil,

A partition is another drive letter on the same physical disk drive. I discovered the hard way that Apache 1.x didn’t like it on another drive (C:\SomewhereElse was fine).

I have no experience moving the default localhost location from htdocs but I’d think that it’s a mere edit of the httpd.conf file.

VirtualHosts? CERTAINLY! I gave you the example(s) from my httpd-vhosts.conf and hosts file - and they work great!

Regards,

DK

i now have several virtual hosts, all working. thanks, again. once you straightened me out on the path, v-host setup, and windows hosts; everything is working well. i put one on a separate hard drive.

thankful member, phil

Phil,

That’s GREAT news! Apache is such good daemon that it’s hard to believe that anyone would use something else (that costs a LOT of $$$). The VirtualHost feature makes it so easy to test multiple domains that I was thrilled when I discovered how to use it and haven’t looked back!

TIP: When you create a virtual host, do NOT use the fully qualified domain name, i.e., example.com! Instead, use example (or simply e similar to my using arj to shorten a rather long domain name) as it’s just as easy to test the {HTTP_HOST} against example as example.com.

Regards,

DK

DK,

things are working great now on my v-host “funstuff”

  1. edited httpd.conf, ~line 174 – DirectoryRoot path “C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/funstuff”
  2. edited httpd-vhosts by adding:
    <VirtualHost 127.0.0.1:80>
    DocumentRoot “C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/funstuff”
    ServerName funstuff
    ServerAlias funstuff
    </VirtualHost>
  3. listed the host in windows

i’m trying to set up a couple of sites with mysql databases and want a simple structure to do the development. so, two sites, each with its own database.

i’m still having trouble with the structure and vocab: host, server, webspace, website

i have had many sites hosted by various providers and am familiar with that structure.

in my instance, is “funstuff” similar to a hosting service?

can i develop multiple sites in “funstuff” by having them in separate directories?

or, do i need a separate v-host block for each site?

can two v-hosts be in different locations? doesn’t line 174 of httpd.conf, “DirectoryRoot” point apache to the dir where all documents are stored?

thanks, phil

Phil,

Okay, great that “funstuff” is working as desired. When you get to WinDoze7 (or Vista), though, you’ll quickly learn to keep Apache AND your website(s) OUT of Program Files (M$'s way to acknowledge its security problems is to prohibit editing of files within Program Files - ARGH!).

Although it worked for you to “move” Apache’s default directory to funstuff, I prefer to leave that alone and deal with the httpd-vhosts file to create new virtual hosts.

Well done on that part - IF you’ve removed the ; from the include statement for httpd-vhosts in the httpd.conf file AND used 127.0.0.1 funstuff in the hosts file.

Okay, my “simplistic” definitions:

host - the “company” which owns the installation of Apache; equivalent to your “various providers”

server - the computer (hardware) used by the host

webspace - that portion of the server’s physical file structure accessible via http protocol, i.e., your website; your "providers will typically have your files in \home\you\ with your webspace in \home\you\public_html or \home\you\www (normally sym linked - internally redirected - to public_html).

website - the “pages” served by Apache to your http visitors via their browsers.

“funstuff” is your “website,” not a hosting service (company).

Yes, you can develop multiple sites in “funstuff” by having them in separate directories just as cPanel (and other control panels) use addon domains (name-based virtual hosts)? Each would require another block in your httpd-vhosts.conf and hosts files.

Yes, vhosts can be in different locations (although I’ve “grouped” mine on the “W” (for “web”) drive under directories for each VirtualHost (including PHPMyAdmin)). As noted above, I leave Apache’s default directory alone (htdocs) rather than muck with it.

Regards,

DK