Databases Reference
In-Depth Information
Apache Web Server configuration
best practices
In
Chapter 2
,
Load Balancing and Clustering Best Practices
, we configured the software
load balancer using the Apache Web Server. We discussed that around 20 percent
to 30 percent of the load of the system will be handled by the Apache Web Server.
It is very important to follow performance best practices in Apache Web Server
configuration to get the best performance. In this section, we will learn performance
best practices related to the Apache Web Server configuration.
Static content delivery
In
Chapter 1
,
Architectural Best Practices
, we discussed about delivering static
content using the Apache Web Server. Delivering static resources of the Liferay
Portal through the Apache Web Server can improve the response time enormously.
When static resources are delivered through the Apache Web Server, no Application
Server overhead is added and ultimately, it improves the response time and
performance. We learned how to configure the software load balancer using the
mod_jk
module of Apache Web Server in
Chapter 2
,
Load Balancing and Clustering
Best Practices
. Let's learn how to extend this configuration and deliver static content
directly through the Apache Web Server.
1.
Stop both the Liferay Portal nodes if they are already running.
2.
Copy the following content from
liferay-node-01
to the
<APACHE_HOME>/
htdocs
directory of the Apache Web Server:
°
node-01\liferay-portal-6.1.1-ce-ga2\ tomcat-7.0.27\
webapps\ROOT\html
°
node-01\liferay-portal-6.1.1-ce-ga2\ tomcat-7.0.27\
webapps\ROOT\layouttpl
°
node-01\liferay-portal-6.1.1-ce-ga2\ tomcat-7.0.27\
webapps\ROOT\wap
°
node-01\liferay-portal-6.1.1-ce-ga2\ tomcat-7.0.27\
webapps\*
(except the root directory)
3.
Edit the
mod_jk.conf
file located in the
<APACHE_HOME>/conf
directory,
and add the following line of code after the
JkMount /* loadblancer
line:
JkUnMount /*.js loadbalancer
JkUnMount /*.png loadbalancer
JkUnMount /*.jpg loadbalancer
JkUnMount /*.gif loadbalancer
JkUnMount /*.ico loadbalancer
JkUnMount /*.swf loadbalancer