<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sebastian Mogilowskis Blog &#187; virtualhost</title>
	<atom:link href="http://www.mogilowski.net/lang/en-us/tag/virtualhost/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mogilowski.net</link>
	<description>Just another blog about administration, linux and other stuff</description>
	<lastBuildDate>Thu, 26 Apr 2012 06:44:10 +0000</lastBuildDate>
	<language>en-us</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Install Tomcat 7 on Debian (Lenny) with virtual hosts and Apache2 integration</title>
		<link>http://www.mogilowski.net/lang/en-us/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration</link>
		<comments>http://www.mogilowski.net/lang/en-us/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration#comments</comments>
		<pubDate>Sat, 11 Dec 2010 12:22:24 +0000</pubDate>
		<dc:creator>sebastian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[virtualhost]]></category>

		<guid isPermaLink="false">http://www.mogilowski.net/?p=720</guid>
		<description><![CDATA[This article is a new version of my Apache Tomcat 6 article. This article describes how to install Apache Tomcat 7 on Debian Lenny, Apache2 integration and virtual hosts. Tocat 7 is not available over the regular sources on Debain Lenny (and Etch) it need to be installed by hand. Tomcat 7 is still BETA. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mogilowski.net/wp-content/uploads/tomcat.gif" alt="" title=" tomcat" width="130" height="92" class="alignright size-full wp-image-723" /><br />
<span lang="en-us">This article is a new version of my <a href="http://www.mogilowski.net/2008/11/24/install-tomcat-6-on-debian-lenny-with-virtual-hosts-and-apache2-integration/" target="_blank">Apache Tomcat 6 article</a>. This article describes how to install Apache Tomcat 7 on Debian Lenny, Apache2 integration and virtual hosts. Tocat 7 is not available over the regular sources on Debain Lenny (and Etch) it need to be installed by hand.</span></p>
<p><strong><span lang="en-us">Tomcat 7 is still BETA. Please use Tomcat 6 for productive servers.</span></strong></p>
<h4><span lang="en-us">1. Install Java 6 runtime:</span></h4>
<p><span lang="en-us">Choose one of the following Java JDK installations:</span></p>
<h4>1.1 OpenJDK</h4>
<pre>
aptitude install openjdk-6-jre
</pre>
<h4>1.2 Sun Java (non-free)</h4>
<pre>
vim /etc/apt/sources
</pre>
<pre>
deb http://ftp.de.debian.org/debian/ lenny main non-free
deb-src http://ftp.de.debian.org/debian/ lenny main non-free
</pre>
<pre>
aptitude update
aptitude install sun-java6-jre
</pre>
<p><em><span lang="en-us"><strong>Note:</strong> Keep in mind that you need a different Apache connector configuration if you use the Sun JDK.</span></em></p>
<h4>2. Download Tomcat</h4>
<p>Download Tomcat 7 <span lang="en-us">from</span> <a title="Tomcat 7" href="http://tomcat.apache.org/download-70.cgi" target="_blank">Tomcat 7 Download</a> <span lang="en-us">page</span>.</p>
<p><span lang="en-us">For example:</span></p>
<pre>
wget http://artfiles.org/apache.org/tomcat/tomcat-7/v7.0.5-beta/bin/apache-tomcat-7.0.5.tar.gz
</pre>
<h4><span lang="en-us">3. Install Tomcat</span></h4>
<pre>
tar -xzvf apache-tomcat-7.0.5.tar.gz
mv apache-tomcat-7.0.5 /opt/tomcat
</pre>
<h4><span lang="en-us">4. Create tomcat user and group</span></h4>
<pre>
groupadd tomcat
useradd -g tomcat -d /opt/tomcat tomcat
usermod -G www-data tomcat
chown tomcat:tomcat /opt/tomcat -R
</pre>
<p><span lang="en-us">This create a new user &#8220;tomcat&#8221; and a group &#8220;tomcat&#8221;. It set the home directory for this user to &#8220;/opt/tomcat&#8221; and join the &#8220;tomcat&#8221; user the &#8220;www-data&#8221; group. This is necessary to access the virtual hosts. Finally give the &#8220;/opt/tomcat&#8221; directory to the new &#8220;tomcat&#8221; user.</span></p>
<h4><span lang="en-us">5. Create Init-Script</span></h4>
<pre>
vim /etc/init.d/tomcat
</pre>
<pre>
#!/bin/sh
#
# /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine
#
# Modified init-Script from Ubuntu Tomcat init-script
#
# 2010 - Sebastian Mogilowski - http://www.mogilowski.net
#
### BEGIN INIT INFO
# Provides:          tomcat
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Should-Start:      $named
# Should-Stop:       $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start Tomcat.
# Description:       Start the Tomcat servlet engine.
### END INIT INFO

set -e

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/tomcat
NAME=tomcat
DESC="Tomcat servlet engine"
DEFAULT=/etc/default/$NAME
JVM_TMP=/tmp/tomcat-tmp

if [ `id -u` -ne 0 ]; then
	echo "You need root privileges to run this script"
	exit 1
fi

# Make sure tomcat is started with system locale
if [ -r /etc/default/locale ]; then
	. /etc/default/locale
	export LANG
fi

. /lib/lsb/init-functions

if [ -r /etc/default/rcS ]; then
	. /etc/default/rcS
fi

# The following variables can be overwritten in $DEFAULT

# Run Tomcat 7 as this user ID and group ID
TOMCAT_USER=tomcat
TOMCAT_GROUP=tomcat

# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
# defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"

# Look for the right JVM to use
for jdir in $JDK_DIRS; do
    if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
	JAVA_HOME="$jdir"
    fi
done
export JAVA_HOME

# Directory where the Tomcat binary distribution resides
CATALINA_HOME=/opt/$NAME

# Directory for per-instance configuration files and webapps
CATALINA_BASE=/opt/$NAME

# Use the Java security manager? (yes/no)
TOMCAT_SECURITY=no

# Default Java options
# Set java.awt.headless=true if JAVA_OPTS is not set so the
# Xalan XSL transformer can work without X11 display on JDK 1.4+
# It also looks like the default heap size of 64M is not enough for most cases
# so the maximum heap size is set to 128M
if [ -z "$JAVA_OPTS" ]; then
	JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
fi

# End of variables that can be overwritten in $DEFAULT

# overwrite settings from default file
if [ -f "$DEFAULT" ]; then
	. "$DEFAULT"
fi

if [ ! -f "$CATALINA_HOME/bin/bootstrap.jar" ]; then
	log_failure_msg "$NAME is not installed"
	exit 1
fi

POLICY_CACHE="$CATALINA_BASE/work/catalina.policy"

if [ -z "$CATALINA_TMPDIR" ]; then
	CATALINA_TMPDIR="$JVM_TMP"
fi

# Set the JSP compiler if set in the tomcat.default file
if [ -n "$JSP_COMPILER" ]; then
	JAVA_OPTS="$JAVA_OPTS -Dbuild.compiler=\"$JSP_COMPILER\""
fi

SECURITY=""
if [ "$TOMCAT_SECURITY" = "yes" ]; then
	SECURITY="-security"
fi

# Define other required variables
CATALINA_PID="/var/run/$NAME.pid"
CATALINA_SH="$CATALINA_HOME/bin/catalina.sh"

# Look for Java Secure Sockets Extension (JSSE) JARs
if [ -z "${JSSE_HOME}" -a -r "${JAVA_HOME}/jre/lib/jsse.jar" ]; then
    JSSE_HOME="${JAVA_HOME}/jre/"
fi

catalina_sh() {
	# Escape any double quotes in the value of JAVA_OPTS
	JAVA_OPTS="$(echo $JAVA_OPTS &#124; sed 's/\"/\\\"/g')"

	AUTHBIND_COMMAND=""
	if [ "$AUTHBIND" = "yes" -a "$1" = "start" ]; then
		JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
		AUTHBIND_COMMAND="/usr/bin/authbind --deep /bin/bash -c "
	fi

	# Define the command to run Tomcat's catalina.sh as a daemon
	# set -a tells sh to export assigned variables to spawned shells.
	TOMCAT_SH="set -a; JAVA_HOME=\"$JAVA_HOME\"; source \"$DEFAULT\"; \
		CATALINA_HOME=\"$CATALINA_HOME\"; \
		CATALINA_BASE=\"$CATALINA_BASE\"; \
		JAVA_OPTS=\"$JAVA_OPTS\"; \
		CATALINA_PID=\"$CATALINA_PID\"; \
		CATALINA_TMPDIR=\"$CATALINA_TMPDIR\"; \
		LANG=\"$LANG\"; JSSE_HOME=\"$JSSE_HOME\"; \
		cd \"$CATALINA_BASE\"; \
		\"$CATALINA_SH\" $@"

	if [ "$AUTHBIND" = "yes" -a "$1" = "start" ]; then
		TOMCAT_SH="'$TOMCAT_SH'"
	fi

	# Run the catalina.sh script as a daemon
	set +e
	touch "$CATALINA_PID" "$CATALINA_BASE"/logs/catalina.out
	chown $TOMCAT_USER "$CATALINA_PID" "$CATALINA_BASE"/logs/catalina.out
	start-stop-daemon --start -b -u "$TOMCAT_USER" -g "$TOMCAT_GROUP" \
		-c "$TOMCAT_USER" -d "$CATALINA_TMPDIR" \
		-x /bin/bash -- -c "$AUTHBIND_COMMAND $TOMCAT_SH"
	status="$?"
	set +a -e
	return $status
}

case "$1" in
  start)
	if [ -z "$JAVA_HOME" ]; then
		log_failure_msg "no JDK found - please set JAVA_HOME"
		exit 1
	fi

	if [ ! -d "$CATALINA_BASE/conf" ]; then
		log_failure_msg "invalid CATALINA_BASE: $CATALINA_BASE"
		exit 1
	fi

	log_daemon_msg "Starting $DESC" "$NAME"
	if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
		--user $TOMCAT_USER --exec "$JAVA_HOME/bin/java" \
		>/dev/null; then

		# Regenerate POLICY_CACHE file
		umask 022
		echo "// AUTO-GENERATED FILE from /opt/tomcat/" \
			> "$POLICY_CACHE"
		echo ""  >> "$POLICY_CACHE"
		cat $CATALINA_BASE/conf/*.policy \
			>> "$POLICY_CACHE"

		# Remove / recreate JVM_TMP directory
		rm -rf "$JVM_TMP"
		mkdir -p "$JVM_TMP" &#124;&#124; {
			log_failure_msg "could not create JVM temporary directory"
			exit 1
		}
		chown $TOMCAT_USER "$JVM_TMP"

		catalina_sh start $SECURITY
		sleep 5
        	if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
			--user $TOMCAT_USER --exec "$JAVA_HOME/bin/java" \
			>/dev/null; then
			if [ -f "$CATALINA_PID" ]; then
				rm -f "$CATALINA_PID"
			fi
			log_end_msg 1
		else
			log_end_msg 0
		fi
	else
	        log_progress_msg "(already running)"
		log_end_msg 0
	fi
	;;
  stop)
	log_daemon_msg "Stopping $DESC" "$NAME"

	set +e
	if [ -f "$CATALINA_PID" ]; then
		start-stop-daemon --stop --pidfile "$CATALINA_PID" \
			--user "$TOMCAT_USER" \
			--retry=TERM/20/KILL/5 >/dev/null
		if [ $? -eq 1 ]; then
			log_progress_msg "$DESC is not running but pid file exists, cleaning up"
		elif [ $? -eq 3 ]; then
			PID="`cat $CATALINA_PID`"
			log_failure_msg "Failed to stop $NAME (pid $PID)"
			exit 1
		fi
		rm -f "$CATALINA_PID"
		rm -rf "$JVM_TMP"
	else
		log_progress_msg "(not running)"
	fi
	log_end_msg 0
	set -e
	;;
   status)
	set +e
	start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
		--user $TOMCAT_USER --exec "$JAVA_HOME/bin/java" \
		>/dev/null 2>&#038;1
	if [ "$?" = "0" ]; then

		if [ -f "$CATALINA_PID" ]; then
		    log_success_msg "$DESC is not running, but pid file exists."
			exit 1
		else
		    log_success_msg "$DESC is not running."
			exit 3
		fi
	else
		log_success_msg "$DESC is running with pid `cat $CATALINA_PID`"
	fi
	set -e
        ;;
  restart&#124;force-reload)
	if [ -f "$CATALINA_PID" ]; then
		$0 stop
		sleep 1
	fi
	$0 start
	;;
  try-restart)
        if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
		--user $TOMCAT_USER --exec "$JAVA_HOME/bin/java" \
		>/dev/null; then
		$0 start
	fi
        ;;
  *)
	log_success_msg "Usage: $0 {start&#124;stop&#124;restart&#124;try-restart&#124;force-reload&#124;status}"
	exit 1
	;;
esac

exit 0
</pre>
<p><span lang="en-us">Download the init-script:</span> <a class="downloadlink" href="http://www.mogilowski.net/wp-content/plugins/download-monitor/download.php?id=12" title="Version 0.1 heruntergeladen 1169 mal" >Tomcat 7 Init-Script (2.6 kB)</a></p>
<pre>
chmod +x /etc/init.d/tomcat
update-rc.d tomcat defaults
</pre>
<h4><span lang="en-us">6. Activate the Tomcat manager</span></h4>
<pre>
vim /opt/tomcat/conf/tomcat-users.xml
</pre>
<pre>
&#60;?xml version='1.0' encoding='utf-8'?&#62;
&#60;tomcat-users&#62;
    &#60;role rolename="manager"/&#62;
    &#60;role rolename="manager-gui"/&#62;
    &#60;role rolename="admin"/&#62;
    &#60;role rolename="admin-gui"/&#62;
    &#60;user username="YOUR_USERNAME" password="YOUR_PASSWORD" roles="admin,admin-gui,manager,manager-gui"/&#62;
&#60;/tomcat-users&#62;
</pre>
<h4>6. Start Tomcat</h4>
<pre>
/etc/init.d/tomcat start
</pre>
<p><span lang="en-us">Now you can access the Tomcat manager with <strong>http://SERVER:8080/manager</strong>.</span></p>
<p><a href="http://www.mogilowski.net/wp-content/uploads/tomcat7-manager.jpg"><img src="http://www.mogilowski.net/wp-content/uploads/tomcat7-manager.jpg" alt="" title=" tomcat7-manager" width="600" height="282" class="aligncenter size-full wp-image-724" /></a></p>
<h4><span lang="en-us">7. Install Apache2 connector</span></h4>
<p><span lang="en-us">You can use the Tomcat as a standalone webserver, but the apache webserver has more features and you can use the apache modules. (mod_rewrite for example)</span></p>
<pre>
aptitude install apache2 libapache2-mod-jk
</pre>
<h4><span lang="en-us">7.1 Apache worker</span></h4>
<pre>
vim /etc/apache2/workers.properties
</pre>
<pre>
workers.tomcat_home=/opt/tomcat
workers.java_home=/usr/lib/jvm/java-6-openjdk
ps=/
worker.list=default
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
</pre>
<p><em><span lang="en-us"><strong>Note:</strong> Replace &#8220;/usr/lib/jvm/java-6-openjdk&#8221; with &#8220;/usr/lib/jvm/java-6-sun&#8221; if you using the non-free Sun Java runtime.</span></em></p>
<h4><span lang="en-us">7.2 JK configuration file</span></h4>
<pre>
vim /etc/apache2/conf.d/jk.conf
</pre>
<pre>
&#60;ifmodule mod_jk.c&#62;
    JkWorkersFile /etc/apache2/workers.properties
    JkLogFile /var/log/apache2/mod_jk.log
    JkLogLevel error
&#60;/ifmodule&#62;
</pre>
<pre>
/etc/init.d/apache2 stop
/etc/init.d/tomcat restart
/etc/init.d/apache2 start
</pre>
<h4><span lang="en-us">8. Create a new VirtualHost</span></h4>
<p><span lang="en-us">Creating a new VirtualHost: (In Apache <strong>AND</strong> Tomcat)</span></p>
<h4><span lang="en-us">8.1 Create directories</span></h4>
<pre>
mkdir /var/www/vhost1
mkdir /var/www/vhost1/htdocs
mkdir /var/www/vhost1/logs
</pre>
<pre>
vim /etc/apache2/sites-available/vhost1
</pre>
<h4>8.2 Apache</h4>
<pre>
&#60;virtualhost www.testsrv.local&#62;
    JkMount /*.jsp default
    ServerName www.testsrv.local
    ServerAdmin servermaster@testsrv.local
    DocumentRoot /var/www/vhost1/htdocs
    ErrorLog /var/www/vhost1/logs/error.log
    CustomLog /var/www/vhost1/logs/access.log common
    &#60;directory /var/www/vhost1/htdocs&#62;
        Options -Indexes
    &#60;/directory&#62;
&#60;/virtualhost&#62;
</pre>
<p><em><span lang="en-us"><strong>Note:</strong> You can forward all files &#8220;JkMount /*&#8221; or all files in a folder &#8220;JkMount /folder/*&#8221; to the Tomcat, too.</span></em></p>
<pre>
a2ensite vhost1
/etc/init.d/apache2 reload
</pre>
<h4>8.3 Tomcat</h4>
<pre>
vim /opt/tomcat/conf/server.xml
</pre>
<pre>
&#60;!-- www.testsrv.local --&#62;
&#60;Host name=&#34;www.testsrv.local&#34; appBase=&#34;/var/www/vhost1&#34; unpackWARs=&#34;true&#34; autoDeploy=&#34;true&#34;&#62;
    &#60;Context path=&#34;&#34; docBase=&#34;htdocs&#34; debug=&#34;0&#34; reloadable=&#34;true&#34;/&#62;
    &#60;Valve className=&#34;org.apache.catalina.valves.AccessLogValve&#34; directory=&#34;/var/www/vhost1/logs&#34;  prefix=&#34;tomcat_access_&#34; suffix=&#34;.log&#34; pattern=&#34;common&#34; resolveHosts=&#34;false&#34;/&#62;
&#60;/Host&#62;
</pre>
<p><em><span lang="en-us"><strong>Note:</strong> Make sure you use a uppercase &#8220;H&#8221;, &#8220;C&#8221; and &#8220;V&#8221; for &#8220;Host&#8221;, &#8220;Content&#8221; and &#8220;Value&#8221;. This is importand since Tomcat 7.</span></em></p>
<pre>
/etc/init.d/tomcat restart
</pre>
<p><em><span lang="en-us"><strong>Note:</strong> You can add additional domains with:</span></em></p>
<pre>
&#60;Alias&#62;additionaldomain.com&#60;/Alias&#62;
</pre>
<p><em></em></p>
<h4><span lang="en-us">9. Create a Testpage</span></h4>
<pre>
vim /var/www/vhost1/htdocs/test.jsp
</pre>
<pre>
&#60;html&#62;
    &#60;head&#62;
        &#60;title&#62;Hello World&#60;/title&#62;
    &#60;/head&#62;
    &#60;body&#62;
        &#60;h1&#62;Hello World&#60;/h1&#62;
        Today is: &#60;%= new java.util.Date().toString() %&#62;
    &#60;/body&#62;
&#60;/html&#62;
</pre>
<p><span lang="en-us">Now you can test your configuration with <strong>http://www.testsrv.local/test.jsp</strong></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mogilowski.net/lang/en-us/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/feed</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Deploy Adobe Coldfusion 8 on Tomcat 6 in a virtual host environment</title>
		<link>http://www.mogilowski.net/lang/en-us/2008/11/24/deploy-adobe-coldfusion-8-on-tomcat-6-in-a-virtual-host-environment</link>
		<comments>http://www.mogilowski.net/lang/en-us/2008/11/24/deploy-adobe-coldfusion-8-on-tomcat-6-in-a-virtual-host-environment#comments</comments>
		<pubDate>Mon, 24 Nov 2008 21:39:42 +0000</pubDate>
		<dc:creator>sebastian</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[2]]></category>
		<category><![CDATA[6]]></category>
		<category><![CDATA[8]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apche2]]></category>
		<category><![CDATA[Coldfusion 8]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[virtualhosts]]></category>

		<guid isPermaLink="false">http://www.mogilowski.net/?p=145&#038;lang=de-de</guid>
		<description><![CDATA[This article describes how to deploy the Adobe Coldfusion 8 server on Tomcat in a virtual hosts environment. Please read my Apache Tomcat 6 Article for the base setup. If you install the coldfusion server in seperate virtual hosts, each will have an own coldfusion administrator with own settings. 1. Download First download the coldfusion-801-lin.bin [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="en-us">This article describes how to deploy the Adobe Coldfusion 8 server on Tomcat in a virtual hosts environment. Please read my <a title="Apache Tomcat6 " href="http//:www.mogilowski.net/?p=121" target="_blank">Apache Tomcat 6 Article</a> for the base setup.</span></p>
<p><span lang="en-us">If you install the coldfusion server in seperate virtual hosts, each will have an own coldfusion administrator with own settings.</span></p>
<h3>1. Download</h3>
<p><span lang="en-us">First download the coldfusion-801-lin.bin (or coldfusion-801-lin64.bin for 64-Bit) installer from the <a title="Adobe Website" href="http://www.adobe.com" target="_blank">Adobe Website</a>.</span></p>
<pre>
wget http://trials.adobe.com/Applications/ColdFusion/801WWE/coldfusion-801-lin64.bin
chmod +x coldfusion-801-lin64.bin
</pre>
<h3><span lang="en-us">2. Prepare system</span></h3>
<h3><span lang="en-us">2.1 Install libraries</span></h3>
<p><span lang="en-us">Coldfusion need some extra libraries for the installation:</span></p>
<pre>
aptitude install libstdc++6 libstdc++5
ln -s /usr/lib/libstdc++-libc6.2-2.so.3 /usr/lib/libstdc++-libc6.1-1.so.2
</pre>
<h3><span lang="en-us">2.2 Modify the virtual host in tomcat</span></h3>
<pre>
vim /opt/tomcat/conf/server.xml
</pre>
<pre>
&#60;!-- www.testsrv.local --&#62;
&#60;host name=&#34;www.testsrv.local&#34; appBase=&#34;/var/www/vhost1/htdocs&#34; unpackWARs=&#34;true&#34; autoDeploy=&#34;true&#34;&#62;
    &#60;context path=&#34;&#34; docBase=&#34;cfusion&#34; debug=&#34;0&#34; reloadable=&#34;true&#34;/&#62;
    &#60;valve className=&#34;org.apache.catalina.valves.AccessLogValve&#34; directory=&#34;/var/www/vhost1/logs&#34;  prefix=&#34;tomcat_access_&#34; suffix=&#34;.log&#34; pattern=&#34;common&#34; resolveHosts=&#34;false&#34;/&#62;
&#60;/host&#62;
</pre>
<h3><span lang="en-us">2.3 Modify the virtual host in apache</span></h3>
<pre>
vim /etc/apache2/sites-enabled/vhost1
</pre>
<pre>
&#60;virtualhost www.testsrv.local:80&#62;
    JkMount /*.cfm default
    JkMount /*.cfc default
    JkMount /*.cfchart default
    DirectoryIndex index.cfm index.html index.htm
    ServerName www.testsrv.local
    ServerAdmin servermaster@testsrv.local
    DocumentRoot /var/www/vhost1/htdocs/cfusion
    ErrorLog /var/www/vhost1/logs/error.log
    CustomLog /var/www/vhost1/logs/access.log common
    &#60;directory /var/www/vhost1/htdocs/cfusion&#62;
        Options -Indexes
    &#60;/directory&#62;
    &#60;directory /var/www/vhost1/htdocs/cfusion/WEB-INF&#62;
        Options -Indexes
        AllowOverride None
        deny from all
    &#60;/directory&#62;
    &#60;directory /var/www/vhost1/htdocs/cfusion/META-INF&#62;
       Options -Indexes
       AllowOverride None
       deny from all
    &#60;/directory&#62;
&#60;/virtualhost&#62;
</pre>
<p><em><span lang="en-us">Note: You should restrict the access to the CFIDE folder, too. With an .htaccess file for example.</span></em></p>
<h3><span lang="en-us">3. Create WAR file</span></h3>
<pre>
./coldfusion-801-lin64.bin
</pre>
<p><span lang="en-us">Select J2EE configuration (WAR file)<br />
This will create a cfusion.war package in /opt/coldfusion8/.</span></p>
<h3><span lang="en-us">4. Deploy the WAR file to a virtual host</span></h3>
<pre>
cp /opt/coldfusion8/cfusion.war /var/www/vhost1/htdocs/
</pre>
<p><em><span lang="en-us">Note: Tomcat will unpack this WAR file and create the cfusion diretory. After that, you can delete the WAR file.</span></em></p>
<h3><span lang="en-us">5. Apply configuration</span></h3>
<pre>
/etc/init.d/tomcat restart
/etc/init.d/apache2 reload
</pre>
<h3><span lang="en-us">6. Complete Coldfusion installation</span></h3>
<p><span lang="en-us">Now you can access the CF Administrator with your browser:</span></p>
<p>http://www.testsrv.local/CFIDE/administrator/index.cfm</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mogilowski.net/lang/en-us/2008/11/24/deploy-adobe-coldfusion-8-on-tomcat-6-in-a-virtual-host-environment/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploy OpenBlueDragon on Tomcat 6 in a virtual host environment</title>
		<link>http://www.mogilowski.net/lang/en-us/2008/11/24/deploy-openbluedragon-on-tomcat-6-in-a-virtual-host-environment</link>
		<comments>http://www.mogilowski.net/lang/en-us/2008/11/24/deploy-openbluedragon-on-tomcat-6-in-a-virtual-host-environment#comments</comments>
		<pubDate>Mon, 24 Nov 2008 21:35:14 +0000</pubDate>
		<dc:creator>sebastian</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[bluedragon]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[openbluedragon]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtual host]]></category>
		<category><![CDATA[virtual hosts]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[virtualhosts]]></category>

		<guid isPermaLink="false">http://www.mogilowski.net/?p=154&#038;lang=de-de</guid>
		<description><![CDATA[This article describes how to deploy OpenBlueDragon server on Tomcat in a virtual hosts environment. Please read my Apache Tomcat 6 Article for the base setup. If you install the BlueDragon server in seperate virtual hosts, each will have an own coldfusion administrator with own settings. 1. Download Download &#8220;J2EE WAR Distribution&#8221; from http://www.openbluedragon.org/download.cfm. 2. [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="en-us">This article describes how to deploy OpenBlueDragon server on Tomcat in a virtual hosts environment. Please read my <a href="http://www.mogilowski.net/?p=121">Apache Tomcat 6 Article</a> for the base setup.</span></p>
<p><span lang="en-us">If you install the BlueDragon server in seperate virtual hosts, each will have an own coldfusion administrator with own settings.</span></p>
<h3>1. Download</h3>
<p><span lang="en-us">Download &#8220;J2EE WAR Distribution&#8221; from <a href="http://www.openbluedragon.org/download.cfm" target="_blank">http://www.openbluedragon.org/download.cfm</a>.</span></p>
<h3><span lang="en-us">2. Prepare system</span></h3>
<h3><span lang="en-us">2.1 Modify the virtual host in tomcat</span></h3>
<pre>
vim /opt/tomcat/conf/server.xml
</pre>

<pre>
&#60;!-- www.testsrv.local --&#62;
&#60;host name=&#34;www.testsrv.local&#34; appBase=&#34;/var/www/vhost1/htdocs&#34; unpackWARs=&#34;true&#34; autoDeploy=&#34;true&#34;&#62;
    &#60;context path=&#34;&#34; docBase=&#34;openbluedragon&#34; debug=&#34;0&#34; reloadable=&#34;true&#34;/&#62;
    &#60;valve className=&#34;org.apache.catalina.valves.AccessLogValve&#34; directory=&#34;/var/www/vhost1/logs&#34;  prefix=&#34;tomcat_access_&#34; suffix=&#34;.log&#34; pattern=&#34;common&#34; resolveHosts=&#34;false&#34;/&#62;
&#60;/host&#62;
</pre>
<h3><span lang="en-us">2.2 Modify the virtual host in apache</span></h3>
<pre>
vim /etc/apache2/sites-enabled/vhost1
</pre>
<pre>
&#60;virtualhost www.testsrv.local:80&#62;
    JkMount /*.cfm default
    JkMount /*.cfc default
    JkMount /*.cfchart default
    DirectoryIndex index.cfm index.html index.htm
    ServerName www.testsrv.local
    ServerAdmin servermaster@testsrv.local
    DocumentRoot /var/www/vhost1/htdocs/openbluedragon
    ErrorLog /var/www/vhost1/logs/error.log
    CustomLog /var/www/vhost1/logs/access.log common
    &#60;directory /var/www/vhost1/htdocs/openbluedragon&#62;
        Options -Indexes
    &#60;/directory&#62;
    &#60;directory /var/www/vhost1/htdocs/openbluedragon/WEB-INF&#62;
        Options -Indexes
        AllowOverride None
        deny from all
    &#60;/directory&#62;
&#60;/virtualhost&#62;
</pre>
<h3><span lang="en-us">3. Deploy the WAR file to a virtual host</span></h3>
<p><span lang="en-us">Copy the downloaded openbluedragon.war file into /var/www/vhost1/htdocs/</span></p>
<p><em><span lang="en-us">Note: Tomcat will unpack this WAR file and create the cfusion diretory. After that, you can delete the WAR file.</span></em></p>
<h3><span lang="en-us">4. Apply configuration</span></h3>
<pre>
/etc/init.d/tomcat restart
/etc/init.d/apache2 reload
</pre>
<h3><span lang="en-us">5. Test configuration</span></h3>
<p><span lang="en-us">Now you can test your installation by opening the BlueDragon CFML test page:</span></p>
<p>http://www.testsrv.local/index.cfm</p>
<h3>6. Administration</h3>
<p><span lang="en-us">On <a href="http://bdadmin.riaforge.org" target="_blank">http://bdadmin.riaforge.org</a> you can get a web admin for the OpenBlueDragon server.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mogilowski.net/lang/en-us/2008/11/24/deploy-openbluedragon-on-tomcat-6-in-a-virtual-host-environment/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Install Tomcat 6 on Debian (Lenny) with virtual hosts and Apache2 integration</title>
		<link>http://www.mogilowski.net/lang/en-us/2008/11/24/install-tomcat-6-on-debian-lenny-with-virtual-hosts-and-apache2-integration</link>
		<comments>http://www.mogilowski.net/lang/en-us/2008/11/24/install-tomcat-6-on-debian-lenny-with-virtual-hosts-and-apache2-integration#comments</comments>
		<pubDate>Mon, 24 Nov 2008 21:29:50 +0000</pubDate>
		<dc:creator>sebastian</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[6]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[mod_jk]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[virtual host]]></category>
		<category><![CDATA[virtual hosts]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[virtualhosts]]></category>

		<guid isPermaLink="false">http://www.mogilowski.net/?p=121&#038;lang=de-de</guid>
		<description><![CDATA[This article is a new version of my Apache Tomcat 5.5 article. In this version i descripe the installation of the open bluedragon in a seperate article. This article only describes how to install Apache Tomcat 6 on Debian Lenny, Apache2 integration and virtual hosts. Tocat 6 is not available over the regular sources on [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="en-us">This article is a new version of my Apache Tomcat 5.5 article.  In this version i descripe the installation of the open bluedragon in a seperate article. This article only describes how to install Apache Tomcat 6 on Debian Lenny, Apache2 integration and virtual hosts. Tocat 6 is not available over the regular sources on Debain Lenny (and Etch) it need to be installed by hand. (On Ubuntu you can get Tomcat 6 with an apt-Installation)</span></p>
<p><strong><span lang="en-us" style="color:red;">UPDATE: Please read the new article:</span> <a target="_blank" href="http://www.mogilowski.net/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/">Tomcat 7 on Debian</a></strong></p>
<h3><span lang="en-us">1. Install Java 6 runtime:</span></h3>
<p><span lang="en-us">Choose one of the following Java JDK installations:</span></p>
<h3>1.1 OpenJDK</h3>
<pre>
aptitude install java6-runtime
</pre>
<h3>1.2 Sun JDK (non-free)</h3>
<pre>
vim /etc/apt/sources
</pre>
<pre>
deb http://ftp.de.debian.org/debian/ lenny main non-free
deb-src http://ftp.de.debian.org/debian/ lenny main non-free
</pre>
<pre>
aptitude update
aptitude install sun-java6-jdk
</pre>
<p><em><span lang="en-us">Note: Keep in mind that you need a different Apache connector configuration if you use the Sun JDK.</span></em></p>
<h3>2. Download Tomcat</h3>
<p>Download Tomcat 6 <span lang="en-us">from</span> <a title="Tomcat 6" href="http://tomcat.apache.org/download-60.cgi" target="_blank">Tomcat 6 Download</a> <span lang="en-us">page</span>.</p>
<p><span lang="en-us">For example:</span></p>
<pre>
wget http://apache.imsam.info/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.gz
</pre>
<h3><span lang="en-us">3. Install Tomcat</span></h3>
<pre>
tar -xzvf apache-tomcat-6.0.18.tar.gz
mv apache-tomcat-6.0.18 /opt/tomcat
</pre>
<h3><span lang="en-us">4. Create Init-Script</span></h3>
<pre>
vim /etc/init.d/tomcat
</pre>
<pre>
#!/bin/sh
# Tomcat Init-Script
case $1 in
    start)
        sh /opt/tomcat/bin/startup.sh
    ;;
    stop)
        sh /opt/tomcat/bin/shutdown.sh
    ;;
    restart)
        sh /opt/tomcat/bin/shutdown.sh
        sh /opt/tomcat/bin/startup.sh
    ;;
esac
exit 0
</pre>
<pre>
update-rc.d tomcat defaults
</pre>
<h3><span lang="en-us">5. Activate the Tomcat manager</span></h3>
<pre>
vim /opt/tomcat/conf/tomcat-users.xml
</pre>
<pre>
&#60;?xml version='1.0' encoding='utf-8'?&#62;
&#60;tomcat-users&#62;
    &#60;role rolename="manager"/&#62;
    &#60;role rolename="admin"/&#62;
    &#60;user username="YOUR_USERNAME" password="YOUR_PASSWORD" roles="admin,manager"/&#62;
&#60;/tomcat-users&#62;
</pre>
<h3>6. Start Tomcat</h3>
<pre>
/etc/init.d/tomcat start
</pre>
<p><span lang="en-us">Now you can access the Tomcat manager with http://SERVER:8080/manager/html.</span></p>
<h3><span lang="en-us">5. Install Apache2 connector</span></h3>
<p><span lang="en-us">You can use the Tomcat as a standalone webserver, but the apache webserver has more features and you can use the apache modules. (mod_rewrite for example)</span></p>
<pre>
aptitude install apache2 libapache2-mod-jk
</pre>
<pre>
vim /etc/apache2/workers.properties
</pre>
<pre>
workers.tomcat_home=/opt/tomcat
workers.java_home=/usr/lib/jvm/java-6-openjdk
ps=/
worker.list=default
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
</pre>
<p><em><span lang="en-us">Note: Replace &#8220;/usr/lib/jvm/java-6-openjdk&#8221; with &#8220;/usr/lib/jvm/java-6-sun&#8221; if you using the non-free Sun Java runtime.</span></em></p>
<p><span lang="en-us">JK configuration file</span></p>
<pre>
vim /etc/apache2/conf.d/jk.conf
</pre>
<pre>
&#60;ifmodule mod_jk.c&#62;
    JkWorkersFile /etc/apache2/workers.properties
    JkLogFile /var/log/apache2/mod_jk.log
    JkLogLevel error
&#60;/ifmodule&#62;
</pre>
<pre>
/etc/init.d/apache2 stop
/etc/init.d/tomcat restart
/etc/init.d/apache2 start
</pre>
<h3><span lang="en-us">6. Create a new VirtualHost</span></h3>
<p><span lang="en-us">Creating a new VirtualHost: (In Apache <strong>AND</strong> Tomcat)</span></p>
<h3><span lang="en-us">6.1 Create directories</span></h3>
<pre>
mkdir /var/www/vhost1
mkdir /var/www/vhost1/htdocs
mkdir /var/www/vhost1/logs
</pre>
<pre>
vim /etc/apache2/sites-available/vhost1
</pre>
<h3>6.2 Apache</h3>
<pre>
&#60;virtualhost www.testsrv.local&#62;
    JkMount /*.jsp default
    ServerName www.testsrv.local
    ServerAdmin servermaster@testsrv.local
    DocumentRoot /var/www/vhost1/htdocs
    ErrorLog /var/www/vhost1/logs/error.log
    CustomLog /var/www/vhost1/logs/access.log common
    &#60;directory /var/www/vhost1/htdocs&#62;
        Options -Indexes
    &#60;/directory&#62;
&#60;/virtualhost&#62;
</pre>
<p><span lang="en-us"><em>Note:</em> You can forward all files &#8220;<em>JkMount /*</em>&#8221; or all files in a folder &#8220;<em>JkMount /folder/*</em>&#8221; to the Tomcat, too.</span></p>
<pre>
a2ensite vhost1
/etc/init.d/apache2 reload
</pre>
<h3>6.3 Tomcat</h3>
<pre>
vim /opt/tomcat/conf/server.xml
</pre>
<pre>
&#60;!-- www.testsrv.local --&#62;
&#60;host name=&#34;www.testsrv.local&#34; appBase=&#34;/var/www/vhost1&#34; unpackWARs=&#34;true&#34; autoDeploy=&#34;true&#34;&#62;
    &#60;context path=&#34;&#34; docBase=&#34;htdocs&#34; debug=&#34;0&#34; reloadable=&#34;true&#34;/&#62;
    &#60;valve className=&#34;org.apache.catalina.valves.AccessLogValve&#34; directory=&#34;/var/www/vhost1/logs&#34;  prefix=&#34;tomcat_access_&#34; suffix=&#34;.log&#34; pattern=&#34;common&#34; resolveHosts=&#34;false&#34;/&#62;
&#60;/host&#62;
</pre>
<pre>
/etc/init.d/tomcat restart
</pre>
<p><em><span lang="en-us">Note: You can add additional domains with:</span></em></p>
<pre>
&#60;alias&#62;additionaldomain.com&#60;/alias&#62;
</pre>
<p><em></em></p>
<h3><span lang="en-us">7. Create a Testpage</span></h3>
<pre>
vim /var/www/vhost1/htdocs/test.jsp
</pre>
<pre>
&#60;html&#62;
    &#60;head&#62;
        &#60;title&#62;Hello World&#60;/title&#62;
    &#60;/head&#62;
    &#60;body&#62;
        &#60;h1&#62;Hello World&#60;/h1&#62;
        Today is: &#60;%= new java.util.Date().toString() %&#62;
    &#60;/body&#62;
&#60;/html&#62;
</pre>
<p><span lang="en-us">Now you can test your configuration with http://www.testsrv.local/test.jsp</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mogilowski.net/lang/en-us/2008/11/24/install-tomcat-6-on-debian-lenny-with-virtual-hosts-and-apache2-integration/feed</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
		<item>
		<title>VirtualHosts,OpenBlueDragon with Tomcat 5.5, Apache2 (mod_jk) on Debian Etch</title>
		<link>http://www.mogilowski.net/lang/en-us/2008/05/31/virtualhosts-mit-openbluedragon-unter-tomcat-55-apache2-mod_jk-auf-debian-etch</link>
		<comments>http://www.mogilowski.net/lang/en-us/2008/05/31/virtualhosts-mit-openbluedragon-unter-tomcat-55-apache2-mod_jk-auf-debian-etch#comments</comments>
		<pubDate>Sat, 31 May 2008 09:24:13 +0000</pubDate>
		<dc:creator>sebastian</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[bluedragon]]></category>
		<category><![CDATA[cfm]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[etch]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[mod_jk]]></category>
		<category><![CDATA[openbluedragon]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[virtual host]]></category>
		<category><![CDATA[virtualhost]]></category>

		<guid isPermaLink="false">http://www.mogilowski.net/?p=24</guid>
		<description><![CDATA[NewAtlanta announced in March, that they will publish an OpenSource version of the BlueDragon ColdFusion server. Integrating OpenBlueDragon into the classic Linux/MySQL environment, will be a real alternative to PHP (LAMP) webservers. This howto describes how you can install OpenBlueDragon with Tomcat 5.5 on Debian Etch. The Tomcat server will be connected with mod_jk with [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="en-us">NewAtlanta announced in March, that they will publish an OpenSource version of the BlueDragon ColdFusion server. Integrating</span><span lang="en-us"> <a title="Open BlueDragon" href="http://www.openbluedragon.org" target="_blank">OpenBlueDragon</a> int</span><span lang="en-us">o the classic Linux/MySQL environment, will be a real alternative to PHP (LAMP) webservers.<br />
</span></p>
<p><span lang="en-us">This howto describes how you can install <a title="Open BlueDragon" href="http://www.openbluedragon.org" target="_blank">OpenBlueDragon</a> with Tomcat 5.5 on Debian Etch. The <a title="Tomcat" href="http://tomcat.apache.org" target="_blank">Tomcat</a><a title="mod_jk" href="http://tomcat.apache.org/connectors-doc/" target="_blank"> </a></span><span lang="en-us">server will be connected wi</span><span lang="en-us">th </span><span lang="en-us"><a title="mod_jk" href="http://tomcat.apache.org/connectors-doc/" target="_blank">mod_jk</a> with the <a title="Apache2" href="http://httpd.apache.org" target="_blank">Apache2</a> webserver. </span></p>
<p><span lang="en-us">You can use this howto without the OpenBlueDragon parts to install an Tomcat server together with Apache2.</span></p>
<p><span lang="en-us">There are a few reasons to install Tomcat with Apache2. You can use Apache to buffer slow connections, take advantage of Apache features such as cgi and PHP,  use Apache modules such as mod_rewrite or you can isolate virtual hosts in their own Tomcat instances</span>.</p>
<p><span lang="en-us">For the Tomcat installation you need the Sun Java JDK. You have to edit /etc/apt/sources.list and add the &#8220;non-free&#8221; pakets:</span></p>
<pre><span lang="en-us">deb http://ftp.debian.org/debian/ main <strong>non-free</strong>
</span>deb-src http://ftp.debian.org/debian/ main <span lang="en-us"><strong>non-free</strong></span></pre>
<p><span lang="en-us">Now you can install the Sun Java JDK:</span></p>
<pre># aptitude update
# aptitude install sun-java5-jdk</pre>

<p><span lang="en-us">After that you can install the Tomcat server:</span></p>
<pre># aptitude install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps</pre>
<p><span lang="en-us">You can test the installation with this URL: http://SERVER:8180</span></p>
<p><span lang="en-us">The next step is to configurate the users for the Tomcat management:</span></p>
<pre># /etc/init.d/tomcat5.5 stop
# vim /var/lib/tomcat5.5/conf/tomcat-users.xml</pre>
<pre>&#60;?xml version='1.0' encoding='utf-8'?&#62;
&#60;tomcat-users&#62;
&#60;role rolename="admin"/&#62;
&#60;role rolename="manager"/&#62;
&#60;role rolename="tomcat"/&#62;
&#60;user username="admin"
password="foobar"
roles="tomcat,admin,manager"/&#62;
&#60;/tomcat-users&#62;

# vim /etc/default/tomcat5.5
TOMCAT5_SECURITY=<strong>no
</strong></pre>
<pre># /etc/init.d/tomcat5.5 start</pre>
<p><span lang="en-us">Of course you have to change the password to your own one. You need the TOMCAT5_SECURITY setting only for the Tomcat administraton webinterface. If you don&#8217;t need the administration, you can keep the setting or restore it if you have finished the configuration.</span></p>
<p><span lang="en-us">Now you can use the Tomcat manager application with this URL: http://SERVER:8180/manager/html and the administrator with this URL: http://SERVER:8180/admin</span></p>
<p><span lang="en-us">You will find a deploy section in the manager. There you can upload and deploy the <em>openbluedragon.war</em> file.</span></p>
<p><span lang="en-us">After the restart of the Tomcat server with &#8220;<em>/etc/init.d/tomcat5.5 restart</em>&#8221; you will find openbluedragon in the application list of the Tomcat manager.</span></p>
<p><span lang="en-us">Installation of the Apache2 Tomcat connector:</span></p>


<pre># aptitude install apache2 libapache2-mod-jk
# vim /etc/apache2/workers.properties

workers.tomcat_home=/usr/share/tomcat5.5
workers.java_home=/usr/lib/jvm/java-1.5.0-sun-1.5.0.14
ps=/
worker.list=default
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
JK Konfigurationsdatai
# vim /etc/apache2/conf.d/jk.conf
&#60;IfModule mod_jk.c&#62;
    JkWorkersFile /etc/apache2/workers.properties
    JkLogFile /var/log/apache2/mod_jk.log
    JkLogLevel error
&#60;/IfModule&#62;</pre>
<pre># /etc/init.d/apache2 stop
# /etc/init.d/tomcat5.5 restart
# /etc/init.d/apache2 start</pre>
<p><span lang="en-us">Creating a new VirtualHost: (In Apache <strong>AND</strong> Tomcat)</span></p>
<p><span lang="en-us">Prepare directories:</span></p>
<pre># mkdir /var/www/vhost1
# mkdir /var/www/vhost1/htdocs
# mkdir /var/www/vhost1/logs</pre>
<p><span lang="en-us">Copy WEB-INF:</span></p>
<pre># cp /var/lib/tomcat5.5/webapps/openbluedragon/WEB-INF /var/www/vhost1/htdocs/</pre>
<p><span lang="en-us">Creating Apache VirtualHost:</span></p>
<pre># vim /etc/apache2/sites-available/vhost1</pre>
<pre>&#60;VirtualHost www.testsrv.local&#62;
    JkMount /*.cfm default
    JkMount /*.cfc default
    JkMount /*.jsp default
    ServerName www.testsrv.local
    ServerAdmin servermaster@testsrv.local
    DocumentRoot /var/www/vhost1/htdocs
    ErrorLog /var/www/vhost1/logs/error.log
    CustomLog /var/www/vhost1/logs/access.log common
    &#60;Location /WEB-INF/ &#62;
      AllowOverride None
      deny from all
    &#60;/Location&#62;
&#60;/VirtualHost&#62;</pre>
<pre># a2ensite vhost1
# /etc/init.d/apache2 reload</pre>
<p><span lang="en-us"><em>Note:</em> You can forward all files &#8220;<em>JkMount /*</em>&#8221; or all files in a folder &#8220;<em>JkMount /folder/*</em>&#8221; to the Tomcat, too.</span></p>
<p><span lang="en-us">Creating Tomcat host:</span></p>
<pre># vim /etc/tomcat5.5/server.xml</pre>
<pre>&#60;!-- www.testsrv.local --&#62;
&#60;Host name="www.testsrv.local" appBase="/var/www/vhost1"
      unpackWARs="true" autoDeploy="true"&#62;
      &#60;Context path="" docBase="htdocs" debug="0" reloadable="true"/&#62;
      &#60;Valve className="org.apache.catalina.valves.AccessLogValve"
             directory="/var/www/vhost1/logs"  prefix="tomcat_access_" suffix=".log"
             pattern="common" resolveHosts="false"/&#62;
&#60;/Host&#62;</pre>
<p><span lang="en-us">At least you have to restart the Apache and the Tomcat:</span></p>
<pre># /etc/init.d/tomcat5.5 restart
# /etc/init.d/apache2 restart</pre>
<p><strong>[UPDATE]</strong><br />
<span lang="en-us">There is a new version of this article available <a href="http://www.mogilowski.net/?p=121">Tomcat 6 with Lenn</a>y and <a href="http://www.mogilowski.net/?p=154">OpenBlueDragon on Tomcat 6</a>.</span><br />
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mogilowski.net/lang/en-us/2008/05/31/virtualhosts-mit-openbluedragon-unter-tomcat-55-apache2-mod_jk-auf-debian-etch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 59/102 queries in 0.070 seconds using apc
Object Caching 894/894 objects using apc

Served from: www.mogilowski.net @ 2012-05-22 18:03:18 -->
