Note: This guide needs root access to the server. It is for VPS and dedicated server owners.
What are Apache and LiteSpeed?
A web server is the program that sends web pages to visitors. Apache and LiteSpeed are two popular ones. LiteSpeed can read Apache's settings, so many servers swap one for the other. But they must not both use the same port at the same time. A port is like a numbered door on the server. Web traffic uses door 80 for normal sites and 443 for secure sites.
Errors often come up when both programs try to use the same door.
Step 1: See which one is running
systemctl status httpd
systemctl status lsws
These show if Apache (httpd) and LiteSpeed (lsws) are running. On Ubuntu, Apache may be called apache2.
Step 2: Check who uses port 80
ss -tlnp | grep ':80'
This lists the program using port 80. Only one program should appear.
Step 3: Read the error log
tail -n 50 /usr/local/apache/logs/error_log
This shows the last 50 lines of the Apache log. Common messages are "Address already in use" and "could not bind to address". Those mean the port is taken.
Step 4: Fix the clash
- Decide which server should be in charge. Usually it is LiteSpeed.
- Stop the other one.
systemctl stop httpd
- Restart LiteSpeed.
systemctl restart lsws
- Check your website in a browser.
Step 5: Check the settings files
A broken line in .htaccess or in the Apache settings can cause errors. Test Apache's settings.
apachectl configtest
This says "Syntax OK" or points to the broken line. Fix that line and try again.
Warning: Back up any settings file before you edit it. A mistake can take all sites offline.
If it still fails, open a support ticket.
Quick recap
- Apache and LiteSpeed must not share the same ports.
- Find which program uses port 80 with
ss. - Stop the one you do not want and restart the other.
- Use
apachectl configtestto find setting mistakes. - Back up files before editing.