systemd service file for openlitespeed

To start/stop OpenLiteSpeed web server, you can use the following systemd service file vi /usr/lib/systemd/system/lshttpd.service Add following content [Unit] Description=OpenLiteSpeed HTTP Server After=network-online.target remote-fs.target nss-lookup.target Wants=network-online.target [Service] Type=forking PIDFile=/var/run/openlitespeed.pid ExecStart=/usr/local/lsws/bin/lswsctrl start ExecReload=/usr/local/lsws/bin/lswsctrl restart ExecStop=/usr/local/lsws/bin/lswsctrl delay-stop KillMode=none PrivateTmp=false Restart=on-failure RestartSec=5 # do not want to be limited in anyway CPUAccounting=false TasksAccounting=false MemoryAccounting=false [Install] WantedBy=multi-user.target Alias=lsws.service Alias=openlitespeed.service … Read more

How to Change PHP version in OpenLiteSpeed

I installed OpenLiteSpeed on a server. The default PHP version was 7.3. I wanted PHP 7.4 on this server. To install PHP 7.4, run apt install -y lsphp74 lsphp74-apcu lsphp74-common lsphp74-curl lsphp74-dbg lsphp74-dev lsphp74-igbinary lsphp74-imagick lsphp74-imap lsphp74-intl lsphp74-ioncube lsphp74-json lsphp74-ldap lsphp74-memcached lsphp74-modules-source lsphp74-msgpack lsphp74-mysql lsphp74-opcache lsphp74-pear lsphp74-pgsql lsphp74-pspell lsphp74-redis lsphp74-snmp lsphp74-sqlite3 lsphp74-sybase lsphp74-tidy To change … Read more

OpenLiteSpeed move Swapping Directory

OpenLiteSpeed

By default OpenLiteSpeed use /tmp/lshttpd/swap for temp files. If your /tmp partition is small, disk may get full. To move OpenLiteSpeed swap partition to / partition do the following. mkdir -p /lswstmp/lshttpd/swap chmod 750 /lswstmp/lshttpd chmod 700 /lswstmp/lshttpd/swap chown -R nobody:nobody /lswstmp/lshttpd Now login to OpenLiteSpeed admin interface at https://your-server-ip:7080/login.php If you don’t have user … Read more

Monitor OpenLiteSpeed with monit

To monitor OpenLiteSpeed with monit on Ubuntu Server, create file vi /etc/monit/conf-enabled/openlitespeed Add following content check process OpenLiteSpeed with pidfile /tmp/lshttpd/lshttpd.pid start program = “/usr/bin/systemctl start lshttpd” stop program = “/usr/bin/systemctl stop lshttpd” Reload monit with monit reload Now monit will monitor OpenLiteSpeed, restart if required. You can check status with monit status If you … Read more

Install Zend OpCache on OpenLiteSpeed Server

Zend OpCache GUI

To install Zend OpCache on OpenLiteSpeed Server, run apt install -y lsphp73-opcache Now restart PHP with command killall -9 lsphp Zend OpCache GUI Zend OpCache GUI shows stats for OpCache. This is for monitoring purpose only. You can download it from https://github.com/amnuts/opcache-gui All you need to do is download the files, exact it, upload it … Read more

OpenLiteSpeed restart PHP

On OpenLiteSpeed, if you edit php.ini or installed a PHP module, restart OpenLiteSpeed won’t show the changes. You will need to restart PHP process. You can do this by killing all PHP process with killall -9 lsphp Or you can create a file touch /usr/local/lsws/admin/tmp/.lsphp_restart.txt If you need PHP restarted just for a web site, … Read more

OpenLiteSpeed Binary Installation

OpenLiteSpeed Change Admin Password

You can download latest version of OpenLiteSpeed web server from https://openlitespeed.org/downloads/ There are 2 download links for each version of OpenLiteSpeed, here we use the binary download. To install verison 1.7.1, run cd /usr/local/src rm -rf openlitespeed* wget https://openlitespeed.org/packages/openlitespeed-1.7.16.tgz tar -zxvf openlitespeed-*.tgz cd openlitespeed ./install.sh To start/stop OpenLiteSpeed, use the following commands /usr/local/lsws/bin/lswsctrl start /usr/local/lsws/bin/lswsctrl … Read more

Install OpenLiteSpeed on CentOS

OpenLiteSpeed Benchmark

To install OpenLiteSpeed web server on CentOS, install repository for your CentOS version For CentOS 6 rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el6.noarch.rpm For CentOS 7 rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm For CentOS 8 rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm To install OpenLiteSpeed, run yum install openlitespeed Before you can install PHP, you need epel repository enabled with yum install epel-release Install PHP with … Read more

OpenLiteSpeed

OpenLiteSpeed Benchmark

OpenLiteSpeed is an open-source version of the popular commercial web server LiteSpeed. OpenLiteSpeed contains all of the essential features found in LiteSpeed Enterprise. You can get OpenLiteSpeed from https://openlitespeed.org Here is a benchmark from the OpenLiteSpeed website that compares OpenLiteSpeed with Nginx. OpenLiteSpeed configuration file To start/stop/restart, use OpenLiteSpeed web server stores cache in directory … Read more

Install OpenLiteSpeed on Ubuntu/Debian

OpenLiteSpeed Change Admin Password

OpenLiteSpeed ia an Open Source version of LiteSpeed Web Server. To install OpenLiteSpeed, add repository by running wget -O – http://rpms.litespeedtech.com/debian/enable_lst_debain_repo.sh | bash Now you have openlitespeed packages available on your server. Here is packages available on a Debian 9 server. To install OpenLiteSpeed, run apt install -y openlitespeed OpenLiteSpeed will be installed in folder … Read more