Meta

Month: July 2012

Have you ever integrated a third party library into your project? You got a big manual full of nice documentation. At the end there was a thin appendix of examples. Which of the two did you read? The examples of course! That’s what the unit tests are! They are the most useful part of the documentation. They are the living examples of how to use the code. They are design documents that are hideously detailed, utterly unambiguous, so formal that they execute, and they cannot get out of sync with the production code.

In order to enable the user-specific public_html directory open up a terminal and switch to the apache module config directory:

cd /etc/apache2/mods-enabled

If you list all the files inside this directory you’ll notice that all of them are actually symbolic links. To enable mod_userdir, which is the module you’re interested in, you’ll have to create two symlinks to the relevant files:

sudo ln -s ../mods-available/userdir.load

sudo ln -s ../mods-available/userdir.conf

All done! Now restart Apache via:

sudo apache2ctl restart

We can now access the web applications stored in our /home/username/public_html directory via http://localhost/~username/