Apache 2.4 Tomcat7 and mod_jk

后端 未结 2 1267
萌比男神i
萌比男神i 2021-01-24 06:45

I want to connect apache2.4 with tomcat7

My configuration is:

workers.properties

    workers.tomcat_home=/var/lib/tomcat7
workers.java_home=/usr/         


        
相关标签:
2条回答
  • 2021-01-24 07:38

    You can ignore those errors referencing 'jk-manager' and 'jk-status' unless you want to enable management of the mod. You need to move the JK mount directive in to the VirtualHost section of your website. You can add the following to /etc/apache2/sites-available/default

    <VirtualHost *:80> ... # Send everything for /* to worker1 JkMount /* worker1 ... </VirtualHost>

    0 讨论(0)
  • 2021-01-24 07:38

    It looks like maybe you're missing a configuration for jk-manager and jk-status. You just need to write them into your workers.properties file. (And if you don't have the tomcat admin package, I believe you need it. If you don't want to install anything, just check out the 'Alternatively' section at the bottom of this post.)

    If you can't find workers.properties file, have a look at your apache config, for example: grep -r JkWorkersFile /etc/apache2. The config should contain something like the following, which indicates the path of the workers.properties file:

    <IfModule jk_module>
        JkWorkersFile /etc/libapache2-mod-jk/workers.properties
        # ...
    </IfModule>
    

    In your workers.properties file:

    Make sure you have the following or something like it:

    # configure jk-status
    worker.list=jk-status
    worker.jk-status.type=status
    worker.jk-status.read_only=true
    # configure jk-manager
    worker.list=jk-manager
    worker.jk-manager.type=status
    

    Alternatively

    Alternatively, you can just remove the XML elements that define jk-manager and jk-status from your Apache config.

    0 讨论(0)
提交回复
热议问题