How to install PHP 7 on Debian / Ubuntu with LSWS support

apt-get -y install libmcrypt-dev libxslt-dev libicu-dev libbz2-dev openssl libcurl4-openssl-dev libssl-dev pkg-config systemtap-sdt-dev
tar zxf php-7.1.1.tar.gz
cd php-7.1.1

./configure --prefix=/usr/local/lsws/lsphp7 --with-mysqli --with-zlib --with-gd --enable-shmop --enable-sockets --enable-sysvsem --enable-sysvshm --enable-mbstring --with-iconv --with-openssl -with-mcrypt --with-pdo-mysql --enable-ftp --enable-zip --with-litespeed --with-curl --with-xsl=/usr --with-bz2=/usr --disable-debug --enable-bcmath --enable-calendar --enable-dba --enable-exif --enable-intl --enable-mbregex --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --disable-opcache --enable-pcntl --enable-dtrace --disable-phpdbg --enable-zend-signals

make -j number_of_proc_available && make install

Now make sure to edit the Command line from Server Configuration > External App
With this line: /usr/local/lsws/lsphp7/bin/lsphp

Then restart the server: service lsws restart