The utility of OpenLiteSpeed’s Web GUI in managed servers
OpenLiteSpeed offers a functional web GUI that allows server administrators to monitor server performance, view vhost settings, and perform a variety of administrative tasks. However, when using ServerAvatar to manage a server, accessing the OpenLiteSpeed GUI via port 7080 can be tricky, leading to a few complications. Why does this happen?
By default, OpenLiteSpeed expects vhost files to be stored in the /usr/local/lsws
directory under separate directories, such as Example.com/{conf,html,logs}
. These folders should be owned by lsadm:lsadm
. From a security perspective, this setup is suboptimal, as an intrusion into one vhost could easily spread to other vhosts due to shared file ownership.
The ServerAvatar development team opted for a different method of managing vhosts, storing website data under different Linux user home directories and placing the related config files in /etc/serveravatar-ols
, which are then added to the server configuration through an include in httpd_config.conf
. This choice causes a conflict with the OpenLiteSpeed web GUI, which enters read-only mode when it detects external vhost config files. This is because it is no longer possible to manage the server from both the GUI and the config files at the same time without causing a conflict.
The Web GUI in read-only mode
This is likely the reason why the ServerAvatar installation script disables access to the OpenLiteSpeed web GUI when it takes over server management. Allowing configuration via the GUI would make it much harder to keep the servers, apps, and databases synchronized.
Even though the OpenLiteSpeed web GUI operates in read-only mode, it still serves as a useful tool for server administrators to monitor real-time performance and access various system logs. Below are the steps needed to restore access to the web GUI.
Steps to enable OpenLiteSpeed Web GUI
- Check if access is enabled by default
First, verify whether you already have access to the web GUI. Take your server’s IP address and try to access it in a web browser with the following link:
http://[your-server-ip]:7080
If the web GUI is disabled, you will receive a 404 “Not Found” error and should proceed with the steps below.
- Re-enable the Web GUI
To enable the web GUI, you will need to rename or remove an empty file called disablewebconsole
. It is recommended to rename the file rather than delete it. To do this, execute the following commands:
sudo -i
cd /usr/local/lsws/conf
mv disablewebconsole disablewebconsole.NOT
systemctl restart lsws
Once you refresh the 404 page, you should be greeted by the OpenLiteSpeed web GUI login screen.
- Obtain or reset the admin password
An admin account for the web GUI is created during the installation of OpenLiteSpeed. You can find the credentials in the adminpasswd
file located in /usr/local/lsws/conf
:
/usr/local/lsws/conf# cat adminpasswd
WebAdmin user/password is admin/whatever
It’s advisable to change both the username and password for security reasons. OpenLiteSpeed provides a script called admpass.sh
that makes this process easier:
/usr/local/lsws/admin/misc# ./admpass.sh
Please specify the user name of administrator.
User name [admin]: serveravatar
Please specify the administrator's password.
Password:
Retype password:
Administrator's username/password is updated successfully!
- You’re all set!
Even though OpenLiteSpeed will operate in read-only mode once you add vhosts to your ServerAvatar-managed server, the web GUI remains a valuable tool. You can monitor server activity in real-time, check the system load average, review the server error log, and verify the status of each configuration setting. The server log viewer alone is worth enabling this tool.
Conclusion
OpenLiteSpeed’s web GUI is an incredibly powerful tool for server administrators, even when it’s in read-only mode due to the external management of vhosts. Restoring access to the GUI is simple, and it offers plenty of functionality for monitoring and maintaining your server. By following these steps, administrators can continue to take full advantage of OpenLiteSpeed’s capabilities, even in environments managed by ServerAvatar.