OpenLiteSpeed change port

The default listening port for OpenLiteSpeed web server is 8088. Many Linux administrators may be more accustomed to using the typical HTTP listening port 80, and HTTPS port 443. If you already have firewall rules or other settings configured for the typical ports, or just need to switch the listening port for other reasons, it is very easy to do inside of the OpenLiteSpeed web panel. In this tutorial, we will guide you through the step by step instructions of changing the default listening port for OpenLiteSpeed server on a Linux system.

In this tutorial you will learn:

  • How to change listening port for OpenLiteSpeed web server
  • How to enable HTTP or HTTPS for the listening port
OpenLiteSpeed change port
OpenLiteSpeed change port
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Debian Linux or Red Hat Enterprise Linux based Linux distro
Software OpenLiteSpeed and LiteSpeed web servers
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

OpenLiteSpeed change port step by step instructions




In this tutorial, we assume that you have already successfully installed OpenLiteSpeed web server, and configured an admin username and password. See the previously mentioned tutorials if you need to do those things first, then follow the steps below to change the default port.

  1. Get started by opening up your web browser and navigating to the OpenLiteSpeed web admin panel, which by default is accessible at https://localhost:7080/login.php. Enter your administrator username and password to get logged in.
    Logging into the OpenLiteSpeed web server
    Logging into the OpenLiteSpeed web server
  2. Once you are logged in, navigate to the Listeners tab on the left side of the screen.
    Click on the Listeners tab in the left hand side
    Click on the Listeners tab in the left hand side
  3. You will see the default listener on this screen (the one for port 8088). Click on it to view its details.
    Open the default listener from the list
    Open the default listener from the list
  4. Next, click on the icon indicated in the screenshot below to edit the settings for this default listener.
    Click on the edit icon
    Click on the edit icon
  5. Now you have the option to enter a new number inside of the Port field on this page. You can also click Yes or No option for the Secure setting, which will tell OpenLiteSpeed whether you intend to use this port for HTTP or HTTPS.

    Enter the new port number and choose whether to use HTTP or HTTPS with it
    Enter the new port number and choose whether to use HTTP or HTTPS with it



  6. After you are satisfied with the changes you have made, click on the little disk icon to save your changes.
    Click on the icon shown here to save your changes to the port number
    Click on the icon shown here to save your changes to the port number
  7. Your changes will now be saved, but they will not take effect just yet. You should see a message that says “Configuration has been modified. To apply changes, please perform a graceful restart.” So, perform the graceful restart by clicking on the green icon in the upper right corner.
    Perform a graceful restart by clicking the icon indicated in this screenshot
    Perform a graceful restart by clicking the icon indicated in this screenshot
  8. Confirm that you indeed want to restart OpenLiteSpeed.
    Restart confirmation box
    Restart confirmation box
  9. All done. In case you need to configure another listener (for example, if you want to listen for both HTTP and HTTPS requests), then return to the Listeners tab and click the Plus icon to add another listener. The steps for doing this will be very much the same as what we just performed above.
    Optionally add another listener
    Optionally add another listener

Closing Thoughts




In this tutorial, we saw how to change the default listening port for the OpenLiteSpeed web server on a Linux system. Most system administrators will likely stick to the usual HTTP port 80 and HTTPS port 443, rather than the arbitrary port 8088 that OpenLiteSpeed has configured by default. This is a very easy change thanks to the web interface provided in OpenLiteSpeed, and it is simple enough to add an extra listener if you want to support both HTTP and HTTPS.



Comments and Discussions
Linux Forum