Documentation

H-Sphere 3.5+

For H-Sphere 3.5+

Requirements 

   1. CloudLinux with liblve 0.8 or later
   2. Apache 2.2.x or 1.3 
   3. mod_suexec should be enabled

Installing CloudLinux Enhancement

There is no need to install mod_hostinglimits -- it comes built in with H-Sphere. Once you load kernel from CloudLinux with liblve 0.8 or later -- it will get enabled.
You can check if LVE is enabled by running:
ps aux | grep httpd | grep DLIBLVE

If you see no output, it means that Apache didn't pick up LVE. Try checking file:
/hsphere/shared/scripts/apache-get-env.sh
Following lines should be there
if [ -e /usr/lib64/liblve.so.0 -o -e /usr/lib/liblve.so.0 ]; then
  APENV_DSSL="$APENV_DSSL -DLIBLVE"
fi

If those strings are absent, you should add it, after:

else
  APENV_DSSL='-DSSL'
fi
###

and before:

# this is used by apacheGetEnv.pm perl module
if [ "$1" = 'show' ] ; then
  set | egrep "^APENV_"
fi

strings. Restart apache afterward.


Converting from mod_fastcgi to mod_fgcid

  • yum install gcc liblve-devel zlib-devel openssl-devel 
  • wget http://apache.mirrors.webname.dk//httpd/mod_fcgid/mod_fcgid-2.3.6.tar.gz
  • tar zxvf mod_fcgid-2.3.6.tar.gz
  • cd cd mod_fcgid-2.3.6/
  • wget http://repo.cloudlinux.com/cloudlinux/sources/mod_fcgid-2.3.6-fix.patch
  • patch -p1 < mod_fcgid-2.3.6-fix.patch
  • APXS=/hsphere/shared/apache2/bin/apxs ./configure.apxs 
  • make
  • mv modules/fcgid/.libs/mod_fcgid.so /hsphere/shared/apache2/modules
  • apply patch http://repo.cloudlinux.com/cloudlinux/sources/mod_fcgid-hsphere/usemodule.phpmode.patch to /hsphere/local/config/scripts/usemodule.phpmode 
  • apply patch http://repo.cloudlinux.com/cloudlinux/sources/mod_fcgid-hsphere/httpd.conf.tmpl.patch to /hsphere/local/config/httpd2/httpd.conf.tmpl 
  • change string in patched /hsphere/local/config/httpd2/httpd.conf.tmpl
    from
<IfDefine FASTCGI>
   <IfDefine !LIBLVE>
       LoadModule fastcgi_module modules/mod_fastcgi.so
   </IfDefine>
   <IfDefine LIBLVE>
       LoadModule fastcgi_module modules/mod_fastcgi_lve.so
   </IfDefine>
</IfDefine>
to
<IfDefine FASTCGI>
   <IfDefine !LIBLVE>
       #LoadModule fastcgi_module modules/mod_fastcgi.so
       LoadModule fcgid_module modules/mod_fcgid.so
   </IfDefine>
   <IfDefine LIBLVE>
       #LoadModule fastcgi_module modules/mod_fastcgi_lve.so
       LoadModule fcgid_module modules/mod_fcgid.so
   </IfDefine>
</IfDefine>
  • put file http://repo.cloudlinux.com/cloudlinux/sources/mod_fcgid-hsphere/fcgi.conf into /hsphere/local/config/httpd2
  • put file http://repo.cloudlinux.com/cloudlinux/sources/mod_fcgid-hsphere/php-wrapper into /hsphere/shared/php5/bin/
  • chmod 755 /hsphere/shared/php5/bin/php-wrapper
  • change permissions for /hsphere/local/home/ to 755
  • change  /hsphere/shared/scripts/logsdir-manipulation.sh to set permissions to: 2775 (drwxrwsr-x), ownership  UID: httpd   GID: old 
  • In H-Sphere CP: E.Manager --> Servers  --> P.Servers --> <fcgid web server> has to be configured with  apache_version 2, apache_fastcgi,apache_status, php_libphp5 checkboxes enabled, but not default, php_fastcgi5; enabled and default. The rest have to be in marked as defaults. Once done, click [save changes] button