Apache Configuration Tip
I was setting up my dev environment again on my laptop (really, starting over and redoing things...long story). Anyway, I like to use Apache with ColdFusion locally, and then setup named virtual hosts for all of my projects, like this:
http://localhost/
http://cfquickdocs/
http://blog/
It's really handy. Well, Apache made some changes in the config file that tripped me up a bit. Normally I go into the http.conf file, and look for <VirtualHost, and then copy their example. Well, in this version of apache (version 2.2.8), they have moved things around a bit. It looks like they have allowed you to separate things out of the main config file, and put virtual host configurations in the /conf/extras directory. Well, I didn't really like this because I don't mess with Apache very much, and the next time I need to edit virtual host configs down the road, I might not find them (if they aren't in the main http.conf file).
So I decided to put the virtual host definitions in the main file anyway to see if it would work. At first it didn't work, my attempts to go to http://cfquickdocs/ just went to the default root site. After some digging around, I found out that you have to move the "NameVirtualHost" directive to the main http.conf file as well. They had moved this into the /conf/extra/httpd-vhosts.conf as well, so I just copied it to the main conf file, and after an Apache restart, all worked as planned. :)
Jake Munson
34 Yrs old
This line:
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
Should be:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Note the missing # at the beginning. Apache 2.2 just makes things a little modular. It's like a cfinclude. :)
Then I can access them easily from Start -> My Docs -> _Apache Config. I also put a shortcut to the hosts file there. Of course this is assuming a Windows setup, but a similar deal could be done with Mac alias files.
Yeah, I saw that line too, but I like I said in my post, I prefer to keep them separate.
@Matt,
Yeah, I should setup shortcuts like that as well, but I'm too lazy. :) It's only once in a blue moon that I actually get in and modify the config...
Oops, I meant to say I prefer to keep it all in the same file.