At work we’re working on a new website in Drupal, and setting up Apache Solr as our search backend. Solr, being Java, runs ideally in a Tomcat installation.
But trying to get Solr, via Tomcat running reliably in Mac OS X Server 10.5.8 was proving to be a bitch of a challenge. Tomcat would start, but trying to access Solr would indicate that it couldn’t find solrconfig.xml or /solr/conf in cwd=/. Well, duh. Tomcat is in /Library/Tomcat.
So, the hack? Edit /Library/Tomcat/bin/startup.sh and put (near the top) “cd /Library/Tomcat”.
Done and done. No idea why it wasn’t setting the cwd (current working directory) to /, but, changing directory in the startup script fixed it.
Like I said… Silliest hack ever.