Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Unable to configure Tomcat7 with Apache2 Web Server

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
bakenoor
Posts: 1
Joined: 2017-07-20 19:38

Unable to configure Tomcat7 with Apache2 Web Server

#1 Post by bakenoor »

I am trying to configure tomcat 7 with Apache HTTP Server but it's not working.

Tomcat is properly running at http://127.0.0.1:8085

I have installed mod_jk:

Code: Select all

aptitude install libapache2-mod-jk
workers.properties found under /etc/apache2:

Code: Select all

worker.list=worker
worker.default.type=ajp13
worker.default.host=localhost
worker.default.port=8009
jk.conf file in /etc/apache2/mods-available/:

Code: Select all

 <IfModule jk_module>
    JkWorkersFile /etc/apache2/workers.properties
    JkLogFile /var/log/apache2/mod_jk.log
    JkLogLevel info
    JkShmFile /var/log/apache2/jk-runtime-status
    <Location /jk-status>
        # Inside Location we can omit the URL in JkMount
        JkMount jk-status
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    </Location>
    <Location /jk-manager>
        # Inside Location we can omit the URL in JkMount
        JkMount jk-manager
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    </Location>
</IfModule>
To enable jk, command
a2enmod jk
has the following output:

Code: Select all

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US.UTF-8",
    LC_ALL = "en_US.UTF-8",
    LC_PAPER = "en_US.UTF-8",
    LC_ADDRESS = "en_US.UTF-8",
    LC_MONETARY = "en_US.UTF-8",
    LC_NUMERIC = "en_US.UTF-8",
    LC_TELEPHONE = "en_US.UTF-8",
    LC_IDENTIFICATION = "en_US.UTF-8",
    LC_MEASUREMENT = "en_US.UTF-8",
    LC_TIME = "en_US.UTF-8",
    LC_NAME = "en_US.UTF-8",
    LANG = "fr_FR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("fr_FR.UTF-8").
Module jk already enabled
Then apache2/site-available/000-default.conf contains a line:

Code: Select all

<VirtualHost *:80>
..
JkMount /tomcat* worker
</VirtualHost>
In Tomcat7 home, there is a directory tomcat under webapps containining an index.jsp

The following has been uncommented in tomcat7/server.xml:

Code: Select all

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
After all this, both tomcat7 and apache2 is restarted and

http://host.com/tomcat gives 404 and I was expecting content of the index.jsp

Am I making an error while configuring tomcat7 with apache web server ?

Post Reply