{"id":2165,"date":"2017-10-05T18:16:41","date_gmt":"2017-10-05T12:46:41","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=2165"},"modified":"2026-09-16T09:36:44","modified_gmt":"2026-09-16T04:06:44","slug":"add-webmail-alias-vestacp-panel-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/add-webmail-alias-vestacp-panel-ubuntu-16-04\/","title":{"rendered":"Add webmail alias in VestaCP panel\u2014Ubuntu 16.04."},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VestaCP is a web hosting control panel that provides an easy-to-use interface for managing websites, domains, email accounts, databases, and other server services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default, accessing webmail may require navigating to the Roundcube URL directly. To make webmail easier for users to access, administrators can configure a <strong>webmail alias<\/strong> such as :<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/webmail.domainname.tld<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This can be configured by adding an Apache VirtualHost entry that points the <code>webmail<\/code> subdomain to the Roundcube installation directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article explains how to configure a webmail alias in <strong>VestaCP on Ubuntu 16.04 using Apache2<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before implementing this configuration, ensure that the following requirements are available:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>VestaCP installed and configured.<\/li>\n\n\n\n<li>Ubuntu 16.04 server.<\/li>\n\n\n\n<li>Apache2 web server.<\/li>\n\n\n\n<li>Root or sudo access.<\/li>\n\n\n\n<li>Roundcube Webmail installed on the server.<\/li>\n\n\n\n<li>A valid domain configured in VestaCP.<\/li>\n\n\n\n<li>DNS configured for the <code>webmail<\/code> subdomain.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, Roundcube is located at:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/share\/roundcube<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Edit the Apache Configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open the Apache configuration file for the required VestaCP user:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vi \/home\/admin\/conf\/web\/apache2.conf<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following VirtualHost configuration at the bottom of the file:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;VirtualHost xx.xx.xx.xx:8080>\n\n    ServerName webmail\n    ServerAlias webmail.*\n\n    DocumentRoot \/usr\/share\/roundcube\n\n    &lt;Directory \/usr\/share\/roundcube>\n        AllowOverride All\n    &lt;\/Directory>\n\n&lt;\/VirtualHost><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">xx.xx.xx.xx<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">with the appropriate server IP address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>DocumentRoot<\/code> points Apache to the Roundcube installation directory:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/share\/roundcube<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>ServerAlias<\/code> allows the webmail hostname to be used for domains hosted on the server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Verify Apache Configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before restarting Apache, verify that the configuration syntax is valid:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apachectl -t<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A successful configuration should return:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Syntax OK<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If Apache reports an error, review the configuration file and correct the issue before restarting the service.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Restart Apache<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Restart Apache to apply the changes:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">service apache2 restart<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can verify the Apache service status using:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">service apache2 status<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Access Webmail<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once Apache has restarted successfully, open the following URL in a browser:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/webmail.domainname.tld<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">domainname.tld<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">with the actual domain name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the configuration and DNS records are correct, the Roundcube webmail interface should be displayed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture Diagram<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image-1.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"221\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image-1-1024x221.png\" alt=\"\" class=\"wp-image-11797\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image-1-1024x221.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image-1-300x65.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image-1-768x166.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image-1-1536x331.png 1536w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image-1.png 1585w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring a webmail alias provides users with a simple and convenient URL for accessing Roundcube Webmail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By adding the appropriate Apache VirtualHost configuration, verifying the Apache syntax, and restarting Apache, users can access webmail using:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/webmail.domainname.tld<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This approach can simplify webmail access for domains managed through VestaCP.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Ubuntu 16.04 is an end-of-life operating system release. For production environments, consider migrating to a currently supported Ubuntu release and use the corresponding Apache\/VestaCP configuration for that environment.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">1. What is a webmail alias?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">A webmail alias provides an easy-to-remember hostname that users can use to access the webmail application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/webmail.domainname.tld<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2. Where is the VestaCP Apache configuration located?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">For the configuration described in this article, the Apache configuration file is:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/home\/admin\/conf\/web\/apache2.conf<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3. Where is Roundcube installed?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, Roundcube is installed at:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/share\/roundcube<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4. How can I verify the Apache configuration?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apachectl -t<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A successful configuration should return:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Syntax OK<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-ssl-certificate-vestacp-panel\/?utm_source=chatgpt.com\" target=\"_blank\" rel=\"noreferrer noopener\">Install SSL Certificate in VestaCP Panel<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/pheonixsolutions.com\/blog\/vestacp-bind-loading-master-file-failed-permission-denied\/?utm_source=chatgpt.com\" target=\"_blank\" rel=\"noreferrer noopener\">VestaCP BIND: Loading Master File Failed \u2013 Permission Denied<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to our experts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Looking for the right technology solution for your business? Our team of experts can help you with development, cloud, DevOps, design, and a wide range of other technology needs. Get in touch with our team&nbsp;<a href=\"https:\/\/pheonixsolutions.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction VestaCP is a web hosting control panel that provides an easy-to-use interface for managing websites, domains, email accounts, databases, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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":"","ast-disable-related-posts":"","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":"default","ast-page-background-enabled":"default","ast-page-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":"","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-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":"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":""},"mobile":{"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":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[344,188],"class_list":["post-2165","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-vestacp","tag-webmail","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-yV","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=2165"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2165\/revisions"}],"predecessor-version":[{"id":11798,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2165\/revisions\/11798"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}