My 404s Don't code and drive

About

Footnote on VirtualHost in Apache2

I recently had to reinstall my web server. I got a really big problem when the virtualhost started overriding the default documentroot. So localhost would point to mysite.locahost etc. A really annoying problem. It turns out that you need to add the original server name first before defining any virutalhost domains. Or as it said on the Apache webpage under “Main host goes away”(someone should really work on that semantic)

"If you are adding virtual hosts to an existing web server, you must also create a <VirtualHost> block for the existing host."

So basically this is what you need to have in your virutalhost conf file

<VirtualHost *:80> DocumentRoot “/Users/myuser/www/” ServerName localhost </VirtualHost>

<VirtualHost *:80> DocumentRoot “/Users/myuser/www/mysite/” ServerName mysite.localhost </VirtualHost>

Bugs Are Simple and Stupid

I said it before. Henceforth this is my debugging algorithm:

Bugs Are Simple and Stupid (BASS) Algorithm

  1. Check input.
  2. Check simple code.
  3. Check complicated code.

First Commit!

Made my first pull request to a large public repository. It got accepted. Achieve!