As nuxwin asked, I'm publishing my experiance of the installation Bitrix CMS as a virtual host (customer) of i-MSCP(php-fpm).
Bitrix is the expensive commercial Management System with a built-in programming language for an Internet Shops, integrated with (in Russia) financial systems, servers, planning systems, support systems, financial databases, etc.
Developels recommends to use VDS on CentOS or Fedora for it, but my customer wants to use it with i-MSCP on Debian 7.
This CMS planned as an secure platform for business, so I need to make a lot of changes to the server configuraton. Other web-hostings doesn't support it at all.
1. eAccelerator
As a system requirements we need to use eAccelerator, but it's hard enough to install it to php 5.3/5.4, we have as default, so we need to use the latest trunk from http://eaccelerator.net/.
Note: we need to reconfigure it any time updating LAMP, so it may be helpful to recompile it periodically (maybe by pressing a button).
- cd /tmpwget https://github.com/eaccelerator/eaccelerator/tarball/mastertar xvfz eaccelerator*cd eaccelerator-master*aptitude -y install make php5-devphpize./configuremake&&make install
Then we need to copy the configuration file and enable it.
- cp /tmp/eaccelerator-master/eaccelerator.ini /etc/php5/mods-available/eaccelerator.iniphp5enmod eacceleratorservice php5-fpm restart
So as we saw using php -v eAccelerator is enabled (we need Zend already installed), but damn, my panel is down according the memory overload, another 2 sites is down too.
Such position is not comfortable, so I desided to use the php-apc instead. (not recommended by Bitrix developers, but the only way to make it close enough). But we need Zend at all!!!
- php5dismod eacceleratorapt-get install php-apcservice php5-fpm restart
2.Mbstring
As I wanted to use UTF-8 version of CMS I need 2 directives to edit.
Fucking my brains, I forgot where domain's php.ini is situated, also we need to use other scripts for subdomains and in case that
mbstring.func_overload = 2 crashing i-MSCP and other scripts, we used .htaccess
- php_value mbstring.internal_encoding UTF-8 php_value mbstring.func_overload 7
Starting CMS installation process... Done.
System tells us to install solution (As for me - shop instance).
It stoped on 58% and showed me the error.
- Error 500! document.write(getUri()); / Internal Server Error! Back
Desided to skip... Installed...
Then I went to the CMS "Security Center"
It said that I need memory_limit = 256M, but it finished on 128M (it's interesting, but I may get any value for admin default, but reseller value is limited by 128)
Also CMS said (and according to the security manual) that php version for the security reasons must be at least 5.4.7 and some other companents, so I was connected backports/
sources.list
- deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-freedeb-src http://ftp.debian.org/debian/ wheezy-backports main contrib non-free
console
- apt-get update && apt-get -t wheezy-backports upgrade
but damn, php is still 5.4.4, so I need dotdeb
sources.list
- deb http://packages.dotdeb.org wheezy alldeb-src http://packages.dotdeb.org wheezy alldeb http://packages.dotdeb.org wheezy-php55 alldeb-src http://packages.dotdeb.org wheezy-php55 all
console
- wget http://www.dotdeb.org/dotdeb.gpgsudo apt-key add dotdeb.gpgapt-get update && apt-get upgrade
But after upgrade php-apc crashed and warn missing depenences
also Securyty Center said that I need to edit php.ini with (I make it global):
- session.entropy_file = /dev/urandomsession.entropy_length = 128
I need to disable Automatic MIME Type Detection for Internet Explorer (XSS-attack protecton), so
/etc/apache2/imscp/bitrix.tld.conf
- <IfModule headers_module>
- Header set X-Content-Type-Options nosniff
- </IfModule>
Doesn't work for me
Didn't solve recommended security issues:
.htaccess mustn't be tracked by Apache in the upload directory
i-MSCP doesn't allow symbols in the SQL password
Can't disable Automatic MIME Type Detection for Internet Explorer
PHP-caching doesn't work
I'm glad it's helpful!