1. The system used in this tutorial has the following installed : Tomcat 6.0.14, Apache 2.2.8
  2. See on <tomcat_home>/conf/server.xml
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  3. Download mod_jk from here
  4. Install mod_jk in Apache module directory
    • On Linux, usual location : 
      • /usr/lib/apache/
      • /usr/lib/apache2/
      • /usr/local/apache/libexec/
    • On Windows, usual location :
      • C:\Program Files\Apache Group\Apache\modules\
      • C:\Program Files\Apache Group\Apache2\modules\
  5. (more…)

Advertisements

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/