{"id":1128,"date":"2012-08-27T14:35:51","date_gmt":"2012-08-27T06:35:51","guid":{"rendered":"http:\/\/rmohan.com\/?p=1128"},"modified":"2012-08-27T15:12:19","modified_gmt":"2012-08-27T07:12:19","slug":"static-page-on-apache-using-tomcat","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=1128","title":{"rendered":"Static page on apache using tomcat"},"content":{"rendered":"<p>he apache main job of the partial pressure, static page as apache on processing, servlets, jsp page ajp13 protocol gave tomcat, tomcat to handle.<\/p>\n<p>http:\/\/archive.apache.org\/dist\/<br \/>http:\/\/archive.apache.org\/dist\/tomcat\/tomcat-5\/v5.5.16\/<br \/>jakarta-tomcat-connectors-jk-1.2.6-src.tar.tar<\/p>\n<p># Tar xzvf jakarta-tomcat-connectors-jk-1.2.6-src.tar.tar<\/p>\n<p># Cd jakarta-tomcat-connectors-jk-1.2.6-src\/jk\/native<\/p>\n<p>#. \/ Configure &#8211; with-apxs = \/ usr\/local\/apache2\/bin\/apxs<\/p>\n<p># Make<\/p>\n<p># Cp .\/apache-2.0\/mod_jk.so \/ usr\/local\/apache2\/modules \/<\/p>\n<p>&nbsp;<\/p>\n<p>the workers.properties will generate jk \/ conf<\/p>\n<p>To copy it to the apache \/ conf \/ with httpd.conf in the same directory,<\/p>\n<p>To the CD mod_jk.so in httpd.conf and Canada<\/p>\n<p>LoadModule jk_module modules \/ mod_jk.so<\/p>\n<p>If workers.properties. Named should join.<br \/>JkWorkersFile &#8220;\/ project \/ apache \/ conf \/ extra \/ workers.properties&#8221;<\/p>\n<p>&nbsp;<\/p>\n<p>My machine plus mod_jk2.so<\/p>\n<p>LoadModule jk_module modules \/ mod_jk.so<\/p>\n<p>&nbsp;<\/p>\n<p>Install apache<\/p>\n<p>sudo. \/ configure &#8211; with-apxs = \/ project \/ apache \/ bin \/ apxs<\/p>\n<p>$ Tar xjvf httpd-2.2.3.tar.bz2<br \/>$ Cd httpd-2.2.3 \/<br \/>. \/ Configure &#8211; prefix = \/ project \/ apache &#8211; enable-rewrite &#8211; enable-so<\/p>\n<p>Domain. \/ Configure &#8211; prefix = \/ usr \/ local \/ apache &#8211; enable-so &#8211; enable-mods-shared = all<br \/>$ Make<br \/>$ Sudo make install<\/p>\n<p>jk operation<br \/>http:\/\/localhost\/jkstatus<\/p>\n<p>Domain is not configured<\/p>\n<p>&lt;Directory &#8220;\/home\/splashnote\/splashnote\/webapp&#8221;&gt;<br \/>\u00a0Options Indexes FollowSymLinks<br \/>\u00a0AllowOverride All<br \/>\u00a0Allow from all<br \/>&lt;\/ Directory&gt;<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\u00a0\u00a0\u00a0\u00a0DocumentRoot \/ home \/ splashnote \/ splashnote \/ webapp<br \/>\u00a0\u00a0\u00a0\u00a0ServerName dns.websketch.com<br \/>\u00a0\u00a0\u00a0\u00a0ServerAlias *. Websketch.com<br \/>\u00a0\u00a0\u00a0\u00a0DirectoryIndex home.html<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&lt;IfModule Mod_rewrite.c&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0RewriteEngine on<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0RewriteCond% {HTTP_HOST} ^ [^.] + \/. Websketch \/. (Com) $<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0RewriteRule ^ (. +)% {HTTP_HOST} $ 1 [C]<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0RewriteRule ^ ([^.] +) \/. Websketch \/. (Com) (. *) $ \/ Home \/ splashnote \/ splashnote \/ webapp \/ sylvan $ 3? $ 1 \/% {QUERY_STRING} [L]<br \/>\u00a0\u00a0\u00a0\u00a0&lt;\/ IfModule&gt;<\/p>\n<p>&lt;\/ VirtualHost&gt;<\/p>\n<p>&nbsp;<\/p>\n<p>jk operation<br \/>http:\/\/localhost\/jkstatus<\/p>\n<p>apache operation<\/p>\n<p>sudo. \/ bin \/ apachectl.-t<\/p>\n<p>sudo. \/ bin \/ apachectl start<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>ubuntu 8.04 installed apache2.2.10 experiences tomcat 6.0<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Download apache under<\/p>\n<p>zlib:<br \/>. \/ Configure &#8211; prefix = \/ root \/ dev_ent \/ zlib<br \/>apr:<br \/>. \/ Configure &#8211; prefix = \/ root \/ dev_ent \/ apr<\/p>\n<p>apr-util:<br \/>. \/ Configure &#8211; with-apr = \/ root \/ dev_ent \/ apr \/ &#8211; with-berkeley-db = \/ usr \/ local \/ bdb<br \/>(Note: apr-util Do &#8211; prefix = \/ \/ .. automatic install \u00ac \/ usr\/local\/apr\/bin\/apu-1-config<\/p>\n<p>apache:<br \/>. \/ Configure &#8211; prefix = \/ root \/ dev_ent \/ apache &#8211; enable-so &#8211; enable-dav &#8211; with-apr = \/ root\/dev_ent\/apr\/bin\/apr-1-config &#8211; with-apr-util = \/ usr\/local\/apr\/bin\/apu-1-config<br \/>(Enable-so &#8211; enable-dav with mod_jk.so to the apache load so)<\/p>\n<p>svn:<br \/>. \/ Configure &#8211; prefix = \/ root \/ dev_ent \/ subversion &#8211; with-berkeley-db = \/ usr \/ local \/ bdb &#8211; with-apxs = \/ root \/ dev_ent \/ apache \/ bin \/ apxs &#8211; with-apr = \/ root\/dev_ent\/apr\/bin\/apr-1-config &#8211; with-apr-util = \/ usr\/local\/apr\/bin\/apu-1-config &#8211; with-ssl &#8211; with-zlib = \/ root \/ dev_ent \/ zlib &#8211; enable-maintainer-mode<br \/>\u00a0Newspaper database bberkeleyDB error<br \/>\u00a0# Tar zxvf db-4.7.25.tar.gz<br \/>\u00a0# Cd db-4.7.25\/build_unix \/<br \/>\u00a0#.. \/ Dist \/ configure &#8211; prefix = \/ usr \/ local \/ bdb<br \/>\u00a0# Make<br \/>\u00a0# Make install<\/p>\n<p>(Note berkeleyDB will occupy 8080)<\/p>\n<p>&nbsp;<\/p>\n<p>workers.properties, mod_jk.conf<\/p>\n<p>workers.properties:<br \/># The following can also do load balancing<br \/># Worker.list = controller, tomcat1, tomcat2<\/p>\n<p>workers.tomcat_home = \/ root\/dev_ent\/apache-tomcat-6.0.14<br \/>workers.java_home = \/ root\/dev_ent\/jdk1.6.0_05<br \/>worker.list = tomcat1<br \/># ======== Tomcat1 ========<\/p>\n<p>worker.tomcat1.port = 8009<\/p>\n<p>worker.tomcat1.host = localhost<\/p>\n<p>worker.tomcat1.type = ajp13<\/p>\n<p>worker.tomcat1.lbfactor = 1<\/p>\n<p># ======== Tomcat2 ========<\/p>\n<p># Worker.tomcat2.port = 9009<\/p>\n<p># Worker.tomcat2.host = localhost<\/p>\n<p># Worker.tomcat2.type = ajp13<\/p>\n<p># Worker.tomcat2.lbfactor = 1<\/p>\n<p># ======== Controller ========<\/p>\n<p># Worker.controller.type = lb<\/p>\n<p># Worker.controller.balanced_workers = tomcat1, tomcat2<\/p>\n<p># Worker.controller.balanced_workers = tomcat1<br \/># Worker.controller.sticky_session = 1<\/p>\n<p>mod_jk.conf file<\/p>\n<p>&nbsp;<\/p>\n<p>LoadModule jk_module modules \/ mod_jk.so<\/p>\n<p>&nbsp;<\/p>\n<p>JkWorkersFile conf \/ workers.properties<\/p>\n<p>&nbsp;<\/p>\n<p>JkMount \/ *. Jsp controller<\/p>\n<p>JkMount \/ *. Do controller<\/p>\n<p>JkMount \/ *. Img controller<\/p>\n<p>conf \/ httpd.conf<\/p>\n<p>Include conf \/ mod_jk.conf<br \/>Include conf \/ extra \/ website.conf<\/p>\n<p>website.conf<\/p>\n<p>JkMount \/ *. Jsp tomcat1<\/p>\n<p>&lt;Directory &#8220;\/root\/project\/website\/webapp&#8221;&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Options Indexes FollowSymLinks<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0AllowOverride All<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Allow from all<br \/>&lt;\/ Directory&gt;<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\u00a0\u00a0\u00a0\u00a0DocumentRoot \/ root \/ project \/ website \/ webapp<br \/>\u00a0\u00a0\u00a0\u00a0ServerName www.website.com<br \/>\u00a0\u00a0\u00a0\u00a0JkMount \/ * tomcat1<br \/>\u00a0\u00a0\u00a0\u00a0JkMount \/ *. Jsp tomcat1<br \/>\u00a0\u00a0\u00a0\u00a0DirectoryIndex student.jsp<br \/>&lt;\/ VirtualHost&gt;<\/p>\n<p>tomcat conf \/ server.xml configuration<\/p>\n<p>\u00a0&lt;Context displayName = &#8220;Welcome to Tomcat&#8221;<br \/>\u00a0\u00a0\u00a0docBase = &#8220;\/ home \/ splashnote \/ splashnote \/ webapp&#8221; path = &#8220;\/ splashnote08&#8221; reloadable = &#8220;true&#8221; workDir = &#8220;work\/Catalina\/localhost\/splashnote08&#8221;&gt;<br \/>\u00a0\u00a0\u00a0<br \/>\u00a0\u00a0&lt;\/ Context&gt;<\/p>\n<p>(Note: there is no path = &#8220;\/&#8221;)<br \/>\/ Etc \/ hosts<br \/>\u00a0ip weburl<\/p>\n","protected":false},"excerpt":{"rendered":"<p>he apache main job of the partial pressure, static page as apache on processing, servlets, jsp page ajp13 protocol gave tomcat, tomcat to handle.<\/p>\n<p>http:\/\/archive.apache.org\/dist\/http:\/\/archive.apache.org\/dist\/tomcat\/tomcat-5\/v5.5.16\/jakarta-tomcat-connectors-jk-1.2.6-src.tar.tar<\/p>\n<p># Tar xzvf jakarta-tomcat-connectors-jk-1.2.6-src.tar.tar<\/p>\n<p># Cd jakarta-tomcat-connectors-jk-1.2.6-src\/jk\/native<\/p>\n<p>#. \/ Configure &#8211; with-apxs = \/ usr\/local\/apache2\/bin\/apxs<\/p>\n<p># Make<\/p>\n<p># Cp .\/apache-2.0\/mod_jk.so \/ usr\/local\/apache2\/modules \/<\/p>\n<p>&nbsp;<\/p>\n<p>the workers.properties will generate jk \/ [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1128"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1128"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1128\/revisions"}],"predecessor-version":[{"id":1130,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1128\/revisions\/1130"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}