How to set up Apache on Windows

  Here's how I set up an Apache server...
  1. Find apache_2.2.9-win-x86-no_ssl-r2.msi, download install.
    The installation wizard will ask for your Network Domain, Server Name and Administrator's email address. I've never been sure what to enter in the first two entries, so I enter scripting.com for the first (the main name for my online world) and the specific name of the machine the software is running on in the second (something like monster8.scripting.com).
    Go for a typical install, and accept the default location.
    Before continuing, if you have other software running on port 80 on this machine, quit it before continuing cause it'll mess up the install.
    When the install is finished, it worked if you see an icon for Apache's popup in the WIndows system tray in the lower-right corner of your screen.
  2. Create aliases of these files on the desktop:
    httpd.conf (it's in the conf folder)
    httpd-vhosts.conf (it's in the extras sub-folder)
  3. Change the root directory from htdocs in the Apache folder to something much shorter. I like to use C:\www. If you don't shorten this, all your file names are going to be very long and waste a lot of typing and visual space.
    You have to set this in two places in httpd.conf:
      http://scripting.com/images/2010/11/26/confChange1.gif
      http://scripting.com/images/2010/11/26/conf2.gif
  4. Uncomment the inclusion of the vhosts.conf file in httpd.conf.
  5. Uncomment the inclusion of the proxy module
    LoadModule proxy_module etc etc.
  6. Add default.html to the list of index files
    http://scripting.com/images/2010/11/27/directoryIndex.gif
  7. Make your .htaccess files work by setting AllowOverride to All
    http://scripting.com/images/2010/11/27/allowOverride.gif
  8. Uncomment the include for modrewrite. This allows your .htaccess files to do reasonable kinds of redirects, like sending references to www.somedomain.com to somedomain.com
    http://scripting.com/images/2010/11/27/modRewrite.gif
  9. Uncomment the include for proxy_http_module
    http://scripting.com/images/2010/11/28/proxyHttpUncomment.gif