Apache Server_ Tomcat and mod_jk on Debi... 100KB by linxiaoqin

VIEWS: 5 PAGES: 4

									Apache Server, Tomcat and mod_jk on Debian 6.0 squeeze | dreamchain   http://www.dreamchain.com/apache-server-tomcat-mod_jk-on-debian-6...




            dreamchain It's all about code
            ← MacPorts, Clojure and                 rApache on Debian 6.0 squeeze or
                                                                                           Tags
            ClassNotFoundException                        Ubuntu 10.04 Lucid Lynx →
                                                                                           Apache backup bash Clojure
               Apache Server, Tomcat and                                                         CSS Debian
                                                                                           CoffeeScript                      Eclipse


               mod_jk on Debian 6.0 squeeze                                                   HTML
                                                                                           Grails            Internet Explorer


               Posted on March 7, 2012 by Simon                                            Java JavaScript
               This is how I integrated Tomcat 6 with Apache 2 on
                                                                                           jQuery linux Mac OS X
               Debian 6.0 (squeeze) using mod_jk. It should also                           MacPorts MooTools
               work on Ubuntu 10.04 Lucid Lynx.
                                                                                           Postgres Prototype R SQL

               Install Apache Web Server:
               > aptitude install apache2

               Verify that the server is running:
               > wget -qO- http://localhost | head -1
               <html><body><h1>It works!</h1>

               Install Tomcat (you don’t need to install tomcat6-
               examples, I did it only for the purpose of this How
               To):
               > aptitude install tomcat6 tomcat6-examples

               Verify that Tomcat server is running:
               > wget -qO- http://localhost:8080 | head -11 | tail -1
               <h1>It works !</h1>

               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

               Enable jk conf:



1/4                                                                                                                       2012.11.27. 10:26
Apache Server, Tomcat and mod_jk on Debian 6.0 squeeze | dreamchain   http://www.dreamchain.com/apache-server-tomcat-mod_jk-on-debian-6...



               > a2enmod jk

               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" />

               Restart Tomcat:
               > /etc/init.d/tomcat6 restart

               Restart Apache web server:
               > /etc/init.d/apache2 restart

               Now verify that everything works:
               > wget -qO- http://localhost/examples/ | tail -7 | head -1
               <H3>Apache Tomcat Examples</H3>

               Done.

               Here is a complete script for setting up Apache 2,
               Tomcat 6 and mod_jk on Ubuntu 10.04.

               References:

                      http://tomcat.apache.org/connectors-
                      doc/generic_howto/quick.html

               This entry was posted in Uncategorized and tagged Apache, Debian,
               tomcat, Unix. Bookmark the permalink.




            ← MacPorts, Clojure and                 rApache on Debian 6.0 squeeze or
            ClassNotFoundException                        Ubuntu 10.04 Lucid Lynx →


            3 Responses to Apache Server,
            Tomcat and mod_jk on Debian 6.0
            squeeze

               1.          Ricardo says:
                    April 6, 2012 at 5:13 pm

                    I followed the example in debian 6 squeeze but not


2/4                                                                                                                      2012.11.27. 10:26
Apache Server, Tomcat and mod_jk on Debian 6.0 squeeze | dreamchain   http://www.dreamchain.com/apache-server-tomcat-mod_jk-on-debian-6...


                    working..

                    In
                    http://localhost/examples/
                    give me page Not Found

                    In
                    Uncomment the following line in /etc/tomcat6
                    /conf/server.xml (/etc/tomcat6/server.xml on
                    Ubuntu):

                    I think the correct is

                    what is missing for this example work?

                    thanks

                    Reply

                                   Simon says:
                            April 6, 2012 at 5:40 pm

                            I just tried it myself again, and it works for
                            me.

                            The correct path is /etc/tomcat6
                            /server.xml. I have updated the post.

                            Did you install tomcat6-examples?

                            Did you uncomment <Connector port=”8009″
                            protocol=”AJP/1.3″ redirectPort=”8443″ /> ?

                            Reply

               2.          Ricardo says:
                    April 7, 2012 at 7:26 pm

                    It works now, seems that some package was not
                    updated in my Debian

                    I made

                    apt-get update
                    apt-get install libapache2-mod-jk
                    a2enmod jk
                    /etc/init.d/tomcat6 restart
                    /etc/init.d/apache2 restart

                    and http://localhost/examples/ works..
                    thanks

                    Reply

            Leave a Reply


3/4                                                                                                                      2012.11.27. 10:26
Apache Server, Tomcat and mod_jk on Debian 6.0 squeeze | dreamchain   http://www.dreamchain.com/apache-server-tomcat-mod_jk-on-debian-6...


            Your email address will not be published. Required fields are
            marked *

            Name *


            Email *


            Website


            Comment




            You may use these HTML tags and attributes:
            <a href="" title=""> <abbr title=""> <acronym
            title=""> <b> <blockquote cite=""> <cite> <code>
            <del datetime=""> <em> <i> <q cite=""> <strike>
            <strong>




            Powered by Dreamchain AB




4/4                                                                                                                      2012.11.27. 10:26

								
To top