Apache Tunning for Liferay

#vim /etc/sysconfig/httpd

First change default prefork MPM for mutli-thread & multi-process worker MPM:

Uncomment HTTPD=/usr/sbin/httpd.worker

#vim /etc/httpd/conf/httpd.conf

Configure MPM worker:

<IfModule worker.c>
ServerLimit             250
StartServers             10
MaxClients              800
MinSpareThreads          75
MaxSpareThreads         250
ThreadLimit              64
ThreadsPerChild          32
MaxRequestsPerChild   10000
</IfModule>

Configure mod_disk_cache for serve liferay document_library. With two minutes cache is sufficient to increase liferay performance.

   <IfModule mod_disk_cache.c>
    CacheDirLevels 10
    CacheDirLength 2
    CacheEnable disk /documents/20182/
    CacheRoot "/tmp/cache"
    CacheIgnoreCacheControl On
    CacheStorePrivate On
    CacheStoreNoStore On
    CacheMaxFileSize 10000000
    CacheIgnoreNoLastMod On
    CacheIgnoreURLSessionIdentifiers On
    CacheMaxExpire 120
    CacheDefaultExpire 120
   </IfModule>

Unmount apj13 path for publish liferay theme images.

    JkUnMount /liferay-theme/images/* worker1

Create alias in httpd.conf for liferay-theme/images

Alias /theme/ "/var/www/theme/"

<Directory "/var/www/theme/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Copy bundle deployed liferay theme images into /var/www/theme

cp -r /opt/liferay/liferay-portal-6.2-ee-sp11/tomcat-7.0.42/webapps/theme/* /var/www/theme

Restart apache

/etc/init.d/httpd restart

With this configuration, your Liferay instance now can solve "The C10K problem"!!


Latest Posts

  • Ansible get started
    instalar ansible en vuestro maquina local. En mi caso, ubuntu: Configurar las ips de los hosts a gestionar con ansible: Importante, se…
    Read More →
  • Apache Tunning for Liferay
    vim /etc/sysconfig/httpd First change default prefork MPM for mutli-thread & multi-process worker MPM: vim /etc/httpd/conf/httpd.conf…
    Read More →
  • Liferay DXP migration
    Configure OLD 6.2 Liferay Portal in local env Get mysql dump and store in local filesystem Start mysql docker container with 6.2 liferay…
    Read More →
  • Redis high availavility installation
    Cookbook to install redis in high availability in master-slave tipology Install redis in a host &lt;APP_SERVER_1_IP> Fill form Configure…
    Read More →
  • Git for dummies
    The basis of any computer project is the SCM. Without a good SCM it will be difficult to reach a good port. So we want to show some first…
    Read More →