Symptoms
-
In an attempt to switch to Apache in Plesk > Tools & Settings > Extensions > My Extensions > LiteSpeed > Switch to Apache, the process fails with the error:
Failed to switch to Apache! This may be due to a configuration error. To manually check this problem, please ssh to your server. Use the following steps to manually switch to Apache: Stop LiteSpeed if lshttpd still running: killall -9 lshttpd Try stop LiteSpeed if lshttpd still running: killall -9 lshttpd Restore Apache httpd if /usr/sbin/httpd_ls_bak exists: mv -f /usr/sbin/httpd_ls_bak /usr/sbin/httpd Run the Apache restart command manually: service httpd restart and check for errors.
- LiteSpeed and Apache services are down.
- All websites are inaccessible.
- The following error can be shown for LiteSpeed service:
Sorry, your trial license key has expired!
lswsctrl[190293]: [ERROR] serial.no is missing!
lswsctrl[190293]: [FATAL] license problem, back to Apache!
Cause
The LiteSpeed extension failed to switch web sites to Apache. As result Apache got down and LiteSpeed was not completely disabled.
Resolution
Apply one of the solutions below:
For RHEL-based OS
-
Log into the server via SSH.
-
Stop LiteSpeed service and all its processes by running the next commands:
# systemctl stop lshttpd.service
# killall -9 lshttpd
- Execute the commands below one by one to restore the Apache configuration:
# unlink /usr/lib/systemd/system/httpd.service
# mv /usr/sbin/httpd /usr/sbin/httpd.back
# mv /usr/sbin/httpd_ls_bak /usr/sbin/httpd
# cp -pr /usr/lib/systemd/system/httpd.service.ls_bak /usr/lib/systemd/system/httpd.service
# ln -s /usr/lib/systemd/system/httpd.service /etc/systemd/system/multi-user.target.wants/httpd.service
- Reload systemd configuration:
# systemctl daemon-reload
- Start the Apache service:
# systemctl restart httpd
For Debian-based OS
-
Log into the server via SSH.
-
Stop LiteSpeed service and all its processes by running the next commands:
# systemctl stop lshttpd.service
# killall -9 lshttpd
- Execute the commands below one by one to restore the Apache configuration:
# unlink /usr/lib/systemd/system/apache2.service
# mv /usr/sbin/apache2 /usr/sbin/apache2.back
# mv /usr/sbin/apache2_ls_bak /usr/sbin/apache2
# cp -pr /usr/lib/systemd/system/apache2.service.ls_bak /usr/lib/systemd/system/apache2.service
# ln -s /usr/lib/systemd/system/apache2.service /etc/systemd/system/multi-user.target.wants/apache2.service
- Reload systemd configuration:
# systemctl daemon-reload
-
Start the Apache service:
# systemctl restart apache2