development notes » quick httpd.conf settings

Apache Quick httpd.conf Settings

Dang, if you survived SourceForge, congrats; this'll be a breeze. There's a slew of settings that you'll either want to change or uncomment-out (ones that are off in the default apache install). Here's the first things I check in httpd.conf.

Note: if you're running multiple sites on don't forget to add any local domains to your Windows Hosts file!

(see also mod rewrite notes)

  1. LoadModule rewrite_module modules/mod_rewrite.so
  2.  
  3. AddModule mod_rewrite.c
  4.  
  5. <Directory />
  6.     Options FollowSymLinks
  7.     AllowOverride All
  8. </Directory>
  9.  
  10. # set which documents the web server should check for
  11. # when a person doesn't specify the file
  12. <IfModule mod_dir.c>
  13.     DirectoryIndex index.php index.htm index.html
  14.       default.htm default.html index.cfm
  15. </IfModule>
  16.  
  17.     # you might need some directory aliases, for example:
  18.     # http:localhost/counterpunch/ might be:
  19.     Alias /counterpunch/ "J:\Projects\counterpunch.org\www\ver02"
  20.  
  21.     # if you use any extensions other than .html, add'em here
  22.     AddType text/html .shtml
  23.     AddHandler server-parsed .shtml
  24.  
  25.     # each domain on your server should have custom 404 page
  26.     ErrorDocument 404 /404.shtml
  27.  
  28. #
  29. # Use name-based virtual hosting.
  30. #
  31. NameVirtualHost *:80
  32.  
  33. # I've got a couple of dozen test sites here local:
  34. <VirtualHost *:80>
  35.     ServerAdmin buzcarterblahblahblahcom
  36.     DocumentRoot G:\Projects\Personal\pizzabytheslice.com\www\ver03
  37.     ServerName pizza.localhost
  38.     ErrorLog logs/pizza.gihugic.com-error_log
  39.     CustomLog logs/pizza.gihugic.com-access_log common
  40. </VirtualHost>