APACHE2+JBOSS7 Dynamic Static separation

Source: Internet
Author: User
Tags jboss

Learn Apache, record configuration for later search

Using the Mode_cluster 1.2.0 Final, which is officially provided by JBoss, this is actually a Apache2 that loads the JBoss load Balancer module, the official version has completed APACHE+JBOSS7 load balancing

The relevant modules required and the associated AJP proxy settings.

Load Balancing Related settings: http://www.cnblogs.com/wangjiajun/p/4211605.html

If you are using a version downloaded from the Apache official website, you need to copy the modules directory from Mode_cluster 1.2.0 final

Mod_proxy_cluster.so, mod_manager.so, mod_slotmem.so, mod_advertise.so four modules to your downloaded Apache version of the modules directory,

and load the module

Remove comments from the following modules

LoadModule Proxy_module modules/mod_proxy.so
LoadModule Proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule Proxy_http_module modules/mod_proxy_http.so

LoadModule Headers_module modules/mod_headers.so

Add the following modules

LoadModule Proxy_cluster_module modules/mod_proxy_cluster.so
LoadModule Manager_module modules/mod_manager.so
LoadModule Slotmem_module modules/mod_slotmem.so
LoadModule Advertise_module modules/mod_advertise.so

My static resources are all in the D:\data\appStoreFileUpload\appStoreUpload.war directory (the virtual directory that was used as jboss before it was detached).

Add Alias/appstoreupload "D:/data/appstorefileupload/appstoreupload.war" to map the directory into a network path

Add Apache access to a directory

<directory "D:/data/appstorefileupload/appstoreupload.war" >
AllowOverride None
Options None
Order Allow,deny
Allow from all
</Directory>

Request path matching, if it is a dynamic request, distributed to JBoss processing, if it is a static resource request, referred to Apache processing

<locationmatch "/appstoreupload/(screenshotimgs/)?" >
Proxypassmatch!
<ifmodule mod_headers.c>
Header set Cache-control "max-age=604800"
</IFModule>
</LocationMatch>
Fileetag None

Configuration complete

Proxypassmatch! Indicates no request forwarding

Fileetag None tells Apache off that Etag,apache will default to the static resource with the ETag header, but this header is usually deprecated.

Reference article: http://my.oschina.net/abcfy2/blog/337619

This address: http://www.cnblogs.com/wangjiajun/p/4561567.html

APACHE2+JBOSS7 Dynamic Static separation

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.