Example 1 - Configuring Tomcat to use KonaKart as a standalone store accessable at yourdomain.com, www.yourdomain.com or store.yourdomain.com. Using a text editor of your choice open /opt/tomcatX/conf/server.xml and add the lines below just after the last closing </Host> tag. <Host appBase="vhostwebapps/konakart" name="yourdomain.com" unpackWARs="true" autoDeploy="true"> <Alias>www.yourdomain.com</Alias> <Context path="" docBase="ROOT" debug="0" reloadable="true"/> <Context path="/konakartadmin" docBase="konakartadmin" debug="0" reloadable="true"/> <Context path="/birt-viewer" docBase="birt-viewer" debug="0" reloadable="true"/> <Logger className="org.apache.catalina.logger.FileLogger" prefix="yourdomain.com." suffix=".txt" timestamp="true"/> </Host> If you want to host your store over a subdomain like store.yourdomain.com the name on the Host tag above should be "name=store.yourdomain.com" and the www.yourdomain.com alias must be replaced with any aliases you have. Next you must add the mod_jk or mod_proxy balancer directives for the Apache web server. The directives must be entered in the Custom Settings area of your your Control Panel. DO NOT add these to the the Apache configuration file (httpd.conf). Go to your Control Panel > Site tab > Website Settings > Custom Settings tab and add the appropriate mod_jk OR mod_proxy_ajp directives below. mod_jk DirectivesJkMount /* ajp13# Directives to enable Apache to continue serving applications dependent on it. SetEnvIf Request_URI "/webmail*" no-jk SetEnvIf Request_URI "/mail*" no-jk SetEnvIf Request_URI "/awstats*" no-jk SetEnvIf Request_URI "/myadmin*" no-jk SetEnvIf Request_URI "/pgadmin*" no-jk SetEnvIf Request_URI "/cgi-bin*" no-jk SetEnvIf Request_URI "/openwebmail*" no-jk mod_proxy_balancer Directives# Directives for eApps applications dependent on ApacheProxyPass /webmail ! ProxyPass /mail ! ProxyPass /joomla ! ProxyPass /awstats ! ProxyPass /myadmin ! ProxyPass /cgi-bin ! ProxyPass /pgadmin ! ProxyPass /openwebmail ! # Directives for your application ProxyPass / ajp://localhost:8009/ |
Example 2 - Configuring Tomcat to add KonaKart context to an existing Host in your server.xml file accessable at yourdomain.com/konakart and www.yourdomain.com/konakart. Using a text editor of your choice open /opt/tomcatX/conf/server.xml and add the lines below just after the last closing </Host> tag. <Host appBase="vhostwebapps/yourdomain.com" name="yourdomain.com" unpackWARs="true" autoDeploy="true"> <Alias>www.yourdomain.com</Alias> <Context path="" docBase="ROOT" debug="0" reloadable="true"/> <!-- context for konakart apps --> <Context path="/konakart" docBase="/opt/tomcatX/vhostwebapps/konakart/ROOT" debug="0" reloadable="true"/> <Context path="/konakartadmin" docBase="/opt/tomcatX/vhostwebapps/konakart/konakartadmin" debug="0" reloadable="true"/> <Context path="/birt-viewer" docBase="/opt/tomcatX/vhostwebapps/konakart/birt-viewer" debug="0" reloadable="true"/> <Logger className="org.apache.catalina.logger.FileLogger" prefix="mydomain.com." suffix=".txt" timestamp="true"/> </Host> Note: You can set path= to a value of your choice. In other words, if you want your visitors to access konakart at yourdomain.com/store your path will be path="/store". Next you must add the mod_jk or mod_proxy balancer directives for the Apache web server. The directives must be entered in the Custom Settings area of your your Control Panel. DO NOT add these to the the Apache configuration file (httpd.conf). Go to your Control Panel > Site tab > Website Settings > Custom Settings tab and add the appropriate mod_jk OR mod_proxy_ajp directives below. mod_jk DirectivesIf you want to use mod_jk to have Apache send your KonaKart request to Tomcat please add the directives below.JkMount /konakart* ajp13 JkMount /konakartadmin* ajp13 JkMount /birt-viewer* ajp13 mod_proxy_ajp DirectivesIf you want to use mod_proxy_ajp to have Apache send your KonaKart requests to Tomcat, please add the directives below.ProxyPass /konakart ajp://localhost:8009/konakart ProxyPass /konakartadmin ajp://localhost:8009/konakartadmin ProxyPass /birt-viewer ajp://localhost:8009/birt-viewer Note: If the path in your context is something other than /konakart, /konakartadmin and /birt-viewer make sure the correct values are in the directives above. For example if your path is path=/store then the directives for mod_jk and mod_proxy_balance will look like the following. Jkmount /store* ajp13 or ProxyPass /store ajp://localhost:8009/store |
Example 3 - Configuring Tomcat to use Konakart with an existing site served by Apache (PHP, PERL, JavaScript, Ruby on Rails, etc) that can be accessed at yourdomain.com/konakart and www.yourdomain.com/konakart. Using a text editor of your choice open /opt/tomcatX/conf/server.xml and add the lines below just after the last closing </Host> tag. <Host appBase="vhostwebapps/yourdomain.com" name="yourdomain.com" unpackWARs="true" autoDeploy="true"> <Alias>www.yourdomain.com</Alias> <Context path="/konakart" docBase="/opt/tomcatX/vhostwebapps/konakart/ROOT" debug="0" reloadable="true"/> <Context path="/konakartadmin" docBase="/opt/tomcatX/vhostwebapps/konakart/konakartadmin" debug="0" reloadable="true"/> <Context path="/birt-viewer" docBase="/opt/tomcatX/vhostwebapps/konakart/birt-viewer" debug="0" reloadable="true"/> <Logger className="org.apache.catalina.logger.FileLogger" prefix="mydomain.com." suffix=".txt" timestamp="true"/> </Host> Note: You can set path= to a value of your choice. In other words if you want your visitors to access KonaKart at yourdomain.com/store your path will be path="/store". Next you must add the mod_jk or mod_proxy balancer directives for the Apache web server. The directives must be entered in the Custom Settings area of your your Control Panel. DO NOT add these to the the Apache configuration file (httpd.conf). Go to your Control Panel > Site tab > Website Settings > Custom Settings tab and add the appropriate mod_jk OR mod_proxy_ajp directives below. mod_jk DirectivesIf you want to use mod_jk to have Apache send your KonaKart request to Tomcat please add the directives belowJkMount /konakart* ajp13 JkMount /konakartadmin* ajp13 JkMount /birt-viewer* ajp13 mod_proxy_ajp DirectivesIf you want to use mod_proxy_ajp to have Apache send your KonaKart requests to Tomcat, please add the directives below.ProxyPass /konakart ajp://localhost:8009/konakart ProxyPass /konakartadmin ajp://localhost:8009/konakartadmin ProxyPass /birt-viewer ajp://localhost:8009/birt-viewer Note: If the path in your context is something other than /konakart, /konakartadmin and /birt-viewer make sure the correct values are in the directives above. For example if your path is path=/store then the directives for mod_jk and mod_proxy_balance will look like the following. Jkmount /store* ajp13 or ProxyPass /store ajp://localhost:8009/store |