How to Set Up Virtual Hosts in LiteSpeed Web Server for Multiple Domains 

Hosting several websites on a single server is simple when you use LiteSpeed virtual hosting. This guide shows you how to configure multiple domains, set document roots, enable SSL, and test your setup. You’ll learn each step in a clear and structured way, making it easy to follow even if you’re new to LiteSpeed. 

What is LiteSpeed Virtual Hosting 

With LiteSpeed virtual hosting, your server can deliver several websites at the same time. Each site has its own domain, document root, and rules. This keeps every project isolated and easy to manage. You can expand your workflow smoothly without additional hardware. 

LiteSpeed virtual hosting lets you run multiple domains on a single server. 

Step 1: Log In to the WebAdmin Console 

Start by signing in to the LiteSpeed WebAdmin Console. Open the following URL in your browser: 

https://your-server-ip:7080 

This interface gives you access to every LiteSpeed setting. Once logged in, you can create and manage all your virtual hosts. 

Step 2: Create a Virtual Host 

Next, open Configuration → Virtual Hosts and click Add. Then enter the required details: 

  • Hostname: mydomain.com 
  • Root: /home/mydomain.com 
  • Config file: vhconf.conf 

After filling in these values, save the virtual host. You now have a separate environment for your domain. 

Step 3: Set the Document Root 

Every website needs a document root, which is the folder where your public files live. Inside your new virtual host, open the General tab and set: 

/home/mydomain.com/html 

Save your changes. LiteSpeed now knows where to find the website files. 

Step 4: Map Your Domain in the Listener 

To connect your domain to the virtual host, go to Configuration → Listeners and select your active listener. Add a new mapping: 

mydomain.com → mydomain.com virtual host 

This step ensures that LiteSpeed routes incoming traffic correctly. 

Step 5: Enable SSL (Optional but recommended) 

If you want to load your site over HTTPS, open the SSL tab in your virtual host. Enable SSL and add your certificate and key paths. When you’re finished, restart LiteSpeed to apply the changes. 

Step 6: Repeat for Additional Domains 

To host more websites, follow the same process for each domain. Create the virtual host, assign a document root, map the domain, and enable SSL if required. This lets you manage a full portfolio, where each site remains isolated and secure. 

Test Your Setup and Monitor Logs 

To confirm everything works, place a simple index.html file inside every document root. Visit each domain in your browser to verify that it loads correctly. 

LiteSpeed also provides detailed logs. You can check them in the WebAdmin interface or on your server: 

/usr/local/lsws/logs/ 

Use these logs to verify traffic and troubleshoot issues. 

Watch Our YouTube Video on Setting Up Virtual Hosts in LiteSpeed 

If you prefer a visual walk-through, we have a YouTube video on our channel ready for you.

Final Thoughts 

Following these steps, you can set up LiteSpeed virtual hosts for any number of domains. This structure keeps your websites clean, organized, and easy to manage while LiteSpeed delivers fast performance and strong security. 

Scroll to Top