Tomcat-subsonic: Difference between revisions

From Karmaking
Jump to navigationJump to search
No edit summary
No edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
old
== Tomcat standalone ==
To allow listening of Tomcat to privileged ports, set <tt>AUTHBIND=yes</tt> in <tt>/etc/default/tomcat6</tt>.
To allow listening of Tomcat to privileged ports, set <tt>AUTHBIND=yes</tt> in <tt>/etc/default/tomcat6</tt>.


Line 7: Line 11:
Subsonic system folder: <tt>/usr/share/subsonic/</tt>
Subsonic system folder: <tt>/usr/share/subsonic/</tt>


$CATALINA_HOME = $CATALINA_BASE= <tt>/var/lib/tomcat6/</tt>
$CATALINA_HOME = $CATALINA_BASE = <tt>/var/lib/tomcat6/</tt>


Config: <tt>/etc/tomcat6/server.xml</tt>
Config: <tt>/etc/tomcat6/server.xml</tt>
== Apache2 with mod_jk ==
Install mod_jk:
<tt># aptitude install libapache2-mod-jk</tt>
Create file <tt>/etc/apache2/workers.properties</tt> with the following content:
<tt>worker.list=worker1<br>
worker.worker1.type=ajp13<br>
worker.worker1.host=localhost<br>
worker.worker1.port=8009</tt>
Create file <tt>/etc/apache2/mods-available/jk.conf</tt> with the following content:
<tt>JkWorkersFile /etc/apache2/workers.properties<br>
JkShmFile /var/log/apache2/mod_jk.shm<br>
JkLogFile /var/log/apache2/mod_jk.log<br>
JkLogLevel info</tt>
Add mount point to <tt>/etc/apache2/sites-available/default</tt>:
<code><VirtualHost *:80><br>
...<br>
JkMount /examples/* worker1<br>
...<br>
</VirtualHost></code>
Uncomment the following line in <tt>/etc/tomcat6/server.xml</tt>:
<code><Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /></code>
In the virtual host configuration file:
<code>
<VirtualHost hostname:443><br>
JkMount /* ajp13_worker<br>
...<br>
DocumentRoot /var/lib/tomcat6/webapps<br>
...<br>
</VirtualHost>
</code>

Latest revision as of 15:14, 25 August 2026

old

Tomcat standalone

To allow listening of Tomcat to privileged ports, set AUTHBIND=yes in /etc/default/tomcat6.

The JKS keystore file needs to reside in /usr/share/tomcat6/.keystore


Subsonic system folder: /usr/share/subsonic/

$CATALINA_HOME = $CATALINA_BASE = /var/lib/tomcat6/

Config: /etc/tomcat6/server.xml

Apache2 with mod_jk

Install mod_jk:

# aptitude install libapache2-mod-jk

Create file /etc/apache2/workers.properties with the following content:

worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

Create file /etc/apache2/mods-available/jk.conf with the following content:

JkWorkersFile /etc/apache2/workers.properties
JkShmFile /var/log/apache2/mod_jk.shm
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info

Add mount point to /etc/apache2/sites-available/default:

<VirtualHost *:80>
...
JkMount /examples/* worker1
...
</VirtualHost>

Uncomment the following line in /etc/tomcat6/server.xml:

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

In the virtual host configuration file:

<VirtualHost hostname:443>
JkMount /* ajp13_worker
...
DocumentRoot /var/lib/tomcat6/webapps
...
</VirtualHost>