
{"id":26572,"date":"2025-08-13T14:06:04","date_gmt":"2025-08-13T12:06:04","guid":{"rendered":"https:\/\/contabo.com\/blog\/?p=26572"},"modified":"2026-01-16T13:06:13","modified_gmt":"2026-01-16T12:06:13","slug":"how-to-set-up-virtual-hosts-in-litespeed-web-server-for-multiple-domains","status":"publish","type":"post","link":"https:\/\/contabo.com\/blog\/how-to-set-up-virtual-hosts-in-litespeed-web-server-for-multiple-domains\/","title":{"rendered":"How to Set Up Virtual Hosts in LiteSpeed Web Server for Multiple Domains\u00a0"},"content":{"rendered":"\n<p>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\u2019ll learn each step in a clear and structured way, making it easy to follow even if you\u2019re new to LiteSpeed.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-litespeed-virtual-hosting\">What is LiteSpeed Virtual Hosting\u00a0<\/h2>\n\n\n\n<p>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.&nbsp;<\/p>\n\n\n\n<p>LiteSpeed virtual hosting lets you run multiple domains on a single server.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-log-in-to-the-webadmin-console\">Step 1: Log In to the WebAdmin Console\u00a0<\/h2>\n\n\n\n<p>Start by signing in to the LiteSpeed WebAdmin Console. Open the following URL in your browser:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;your-server-ip:7080 <\/code><\/pre>\n\n\n\n<p>This interface gives you access to every LiteSpeed setting. Once logged in, you can create and manage all your virtual hosts.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-create-a-virtual-host\">Step 2: Create a Virtual Host\u00a0<\/h2>\n\n\n\n<p>Next, open <strong>Configuration \u2192 Virtual Hosts<\/strong> and click <strong>Add<\/strong>. Then enter the required details:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hostname:<\/strong> mydomain.com&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Root:<\/strong> \/home\/mydomain.com&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Config file:<\/strong> vhconf.conf&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>After filling in these values, save the virtual host. You now have a separate environment for your domain.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-set-the-document-root\">Step 3: Set the Document Root\u00a0<\/h2>\n\n\n\n<p>Every website needs a document root, which is the folder where your public files live. Inside your new virtual host, open the <strong>General<\/strong> tab and set:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/mydomain.com\/html&nbsp;<\/code><\/pre>\n\n\n\n<p>Save your changes. LiteSpeed now knows where to find the website files.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-4-map-your-domain-in-the-listener\">Step 4: Map Your Domain in the Listener\u00a0<\/h2>\n\n\n\n<p>To connect your domain to the virtual host, go to <strong>Configuration \u2192 Listeners<\/strong> and select your active listener. Add a new mapping:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydomain.com \u2192 mydomain.com virtual host&nbsp;<\/code><\/pre>\n\n\n\n<p>This step ensures that LiteSpeed routes incoming traffic correctly.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-5-enable-ssl-optional-but-recommended\">Step 5: Enable SSL (Optional but recommended)\u00a0<\/h2>\n\n\n\n<p>If you want to load your site over HTTPS, open the <strong>SSL<\/strong> tab in your virtual host. Enable SSL and add your certificate and key paths. When you&#8217;re finished, restart LiteSpeed to apply the changes.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-6-repeat-for-additional-domains\">Step 6: Repeat for Additional Domains\u00a0<\/h2>\n\n\n\n<p>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.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-test-your-setup-and-monitor-logs\">Test Your Setup and Monitor Logs\u00a0<\/h2>\n\n\n\n<p>To confirm everything works, place a simple <strong>index.html<\/strong> file inside every document root. Visit each domain in your browser to verify that it loads correctly.&nbsp;<\/p>\n\n\n\n<p>LiteSpeed also provides detailed logs. You can check them in the WebAdmin interface or on your server:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/lsws\/logs\/&nbsp;<\/code><\/pre>\n\n\n\n<p>Use these logs to verify traffic and troubleshoot issues.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-watch-our-youtube-video-on-setting-up-virtual-hosts-in-litespeed\">Watch Our YouTube Video on Setting Up Virtual Hosts in LiteSpeed\u00a0<\/h2>\n\n\n\n<p>If you prefer a visual walk-through, we have a YouTube video on our channel ready for you.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"ast-oembed-container \" style=\"height: 100%;\"><iframe loading=\"lazy\" title=\"How to set up virtual hosts with a LiteSpeed web server\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/D8qcGaby42M?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-final-thoughts\">Final Thoughts\u00a0<\/h2>\n\n\n\n<p>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.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2019ll learn each step in a clear and structured way, making it easy to follow even if you\u2019re new to LiteSpeed.&nbsp; What [&hellip;]<\/p>\n","protected":false},"author":77,"featured_media":26576,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[18],"tags":[],"ppma_author":[3116],"class_list":["post-26572","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"uagb_featured_image_src":{"full":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Set-Up-Virtual-Hosts-in-LiteSpeed-Web-Server-for-Multiple-Domains-.png",1200,630,false],"thumbnail":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Set-Up-Virtual-Hosts-in-LiteSpeed-Web-Server-for-Multiple-Domains--150x150.png",150,150,true],"medium":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Set-Up-Virtual-Hosts-in-LiteSpeed-Web-Server-for-Multiple-Domains--600x315.png",600,315,true],"medium_large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Set-Up-Virtual-Hosts-in-LiteSpeed-Web-Server-for-Multiple-Domains--768x403.png",768,403,true],"large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Set-Up-Virtual-Hosts-in-LiteSpeed-Web-Server-for-Multiple-Domains-.png",1200,630,false],"1536x1536":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Set-Up-Virtual-Hosts-in-LiteSpeed-Web-Server-for-Multiple-Domains-.png",1200,630,false],"2048x2048":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Set-Up-Virtual-Hosts-in-LiteSpeed-Web-Server-for-Multiple-Domains-.png",1200,630,false]},"uagb_author_info":{"display_name":"Anika Kopte","author_link":"https:\/\/contabo.com\/blog\/author\/anika\/"},"uagb_comment_info":0,"uagb_excerpt":"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\u2019ll learn each step in a clear and structured way, making it easy to follow even if you\u2019re new to LiteSpeed.&nbsp; What&hellip;","authors":[{"term_id":3116,"user_id":77,"is_guest":0,"slug":"anika","display_name":"Anika Kopte","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/1c425caa652c679ae47e3f85a48de4e19f09d37bcb5593ba88a7aa4a08bb1d81?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/26572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/comments?post=26572"}],"version-history":[{"count":4,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/26572\/revisions"}],"predecessor-version":[{"id":27435,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/26572\/revisions\/27435"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media\/26576"}],"wp:attachment":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media?parent=26572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/categories?post=26572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/tags?post=26572"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=26572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}