Jkmount configuration is in effect on the virtual host

Source: Internet
Author: User

Because of the need, the jkmount instructions that would otherwise work in the global domain mod_jk.conf only work in a certain domain:
In fact, I want to make Jkmount/*.htm controller only take effect in the virtual domain.

Original configuration:
Apache httpd.conf:
Include "conf/mod_jk.conf"
Mod_jk.conf:
LoadModule Jk_module modules/mod_jk-1.2.23-apache-2.2.x-linux-i686.so
Jkworkersfile conf/workers.properties
Jklogfile Logs/mod_jk.log
Jkloglevel Error
Jkmount/*.jsp Controller
Jkmount/*.do Controller
Jkmount/*useraction.zip Controller
...
Jkmount/*.jar Controller
Jkmount/*.htm Controller
jkmount/servlet/* Controller
...........

My workaround:
1. Comment out the include "conf/mod_jk.conf" in Apache;
2. Use the four directives of the yellow font above as the global configuration of the virtual host profile httpd-vhost.conf:
LoadModule Jk_module modules/mod_jk-1.2.23-apache-2.2.x-linux-i686.so
Jkworkersfile conf/workers.properties
Jklogfile Logs/mod_jk.log
Jkloglevel Error
Namevirtualhost *:80
<virtualhost *:80>
...
Include "/usr/local/apache22/conf/mod_jk.conf"
</VirtualHost>
3. Reload the configuration file to make it effective:
/usr/local/apache22/bin/httpd-k Graceful

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.