virtual host file for Apache<\/a> – this is so that you can access your Roundcube instance using your domain name.<\/p>\r\n\r\n\r\n\r\nCreate the virtual host file by executing the following command:<\/p>\r\n\r\n\r\n\r\n
nano \/etc\/apache2\/sites-available\/roundcube.conf<\/pre>\r\n\r\n\r\n\r\nAnd\u00a0enter the following information:<\/p>\r\n\r\n\r\n\r\n
<VirtualHost *:80>\r\n DocumentRoot \/var\/www\/roundcube\r\n ServerName webmail.mydomain.com \r\n<Directory \/var\/www\/roundcube\/>\t \t \r\n Options -Indexes\t \t \r\n AllowOverride All\t \t \r\n Order allow,deny\t \t \r\n allow from all\t \t \r\n <\/Directory>\t \t \r\n ErrorLog ${APACHE_LOG_DIR}\/roundcube_error.log\t \t \r\n CustomLog ${APACHE_LOG_DIR}\/roundcube_access.log combined\t \t \r\n<\/VirtualHost><\/pre>\r\n\r\n\r\n\r\nIn our example, we will use a subdomain called webmail.mydomain.com<\/code>. Make sure to replace webmail.mydomain.com<\/code>\u00a0with your actual domain\/subdomain name that you would like to use for your Roundcube.<\/p>\r\n\r\n\r\n\r\nTo enable the new Roundcube virtual host, run the following command:<\/p>\r\n\r\n\r\n\r\n
sudo a2ensite roundcube.conf<\/pre>\r\n\r\n\r\n\r\nYou should see the following output:<\/p>\r\n\r\n\r\n\r\n
Enabling site roundcube.<\/pre>\r\n\r\n\r\n\r\nTo activate the new configuration, you need to run:<\/p>\r\n\r\n\r\n\r\n
systemctl reload apache2<\/pre>\r\n\r\n\r\n\r\nYou also need to enable the Apache mod_rewrite<\/code> module. You can do this with the following command:<\/p>\r\n\r\n\r\n\r\nsudo a2enmod rewrite<\/pre>\r\n\r\n\r\n\r\nReload your Apache in order to activate the new configuration:<\/p>\r\n\r\n\r\n\r\n
sudo systemctl reload apache2<\/pre>\r\n\r\n\r\n\r\n