Installing Tomcat 6 on a cPanel Server


The cPanel EasyApache system makes it easy to recompile Apache with various add-ons and modules. There’s even a checkbox for adding Tomcat. Unfortunately, this installs Tomcat 5.5, and I needed Tomcat 6.0. Here’s how I got it:

1) install Tomcat 5.5 using EasyApache (see this .pdf for details)

2) download and expand Tomcat 6 in /usr/local/jakarta

3) change the tomcat symlink to point to your new version (i.e. /usr/local/jakarta/apache-tomcat-6.0.XX)

4) from http://trulymanaged.com/blog/installation-of-tomcat6/:

#cd apache-tomcat-6.0.18
# cd bin
# tar xvfz jsvc.tar.gz
# cd jsvc-src
# chmod +x configure
# ./configure
# make
# cp jsvc ..
# cd ..

5) copy over any Host blocks from tomcat/conf/server.xml from the old Tomcat install to the new Tomcat install (you may or may not be able to set up new hosts through WHM)

6) copy over conf/workers.properties from the old Tomcat install to the new Tomcat install

7) start tomcat normally (/usr/sbin/starttomcat)

The /manager/html/ Tomcat manager application doesn’t load, though, so it’s not perfect.

If you ever need your old Tomcat back just stop Tomcat, flip the tomcat symlink back to the old install, and restart Tomcat.



Dreamhost to Google Apps naked domain name redirection


I’ve had this problem twice in recent memory, which warrants taking notes.

Dreamhost has a handy “Google Hosted” feature where with a single click they’ll completely configure your domain to use Google Apps. You can then use Google Sites and the rest of the Apps suite for your entire website. Unfortunately, while Google Sites allows you to map a subdomain to a Google Site page, mapping naked domains (e.g. example.com) are not supported. If one maps the www subdomain to a Google Site then the traditional www.example.com will resolve, but example.com gives a Google-served 404 error. When using the Dreamhost “Google Hosted” feature all of the generated domain DNS records are non-editable, so you’re stuck with an A record which maps the domain to a nonexistent site.

My solution was to not use the Dreamhost “Google Hosted” feature at all, but to instead use the “DNS Only” option. I copied down all the generated DNS entries from the “Google Hosted” setup and manually recreated them, with one exception. The A record for the naked domain I directed to 174.129.25.170, which is the IP address of WWWizer, a free service which handily redirects any naked domain request the the corresponding www subdomain.

Now I have a site set up on my www subdomain with Google footing the hosting bill, and naked domain requests are seamlessly redirected to the www-based home page.


powered by WordPress     themed by Mukkamu     presented by ideaharbor.org     everything else by steve hulet