<\/span><\/h2>\nThere are two RainLoop Webmail editions available for download: Community Edition (under the AGPL v3 license) and Standard Edition (under the RainLoop software license)<\/p>\n
For the purposes of this tutorial, we will install the free and open source community edition.<\/p>\n
To download the latest RainLoop Webmail community version, run the following command:<\/p>\n
wget http:\/\/www.rainloop.net\/repository\/webmail\/rainloop-community-latest.zip<\/pre>\nNext, let’s create a new directory for our RainLoop webmail installation. In our example, we will use \/var\/www\/rainloop<\/code>, but you can also choose a different location.<\/p>\nTo create the rainloop<\/code> directory, run the following command:<\/p>\nsudo mkdir \/var\/www\/rainloop<\/pre>\nTo extract the files into this new directory, run the following command:<\/p>\n
unzip rainloop-community-latest.zip -d \/var\/www\/rainloop<\/pre>\n<\/span>Step 3: Set Permissions<\/span><\/h2>\nOnce the installation is completed, you will need to set the correct file and directory permissions.<\/p>\n
To set the proper read\/write permissions, run the following commands:<\/p>\n
cd \/var\/www\/rainloop\r\nfind . -type d -exec chmod 755 {} \\;\r\nfind . -type f -exec chmod 644 {} \\;<\/pre>\nThe owner of the files needs to be the user of the web server running on your system. In our example, we are using the Apache web server and Apache runs under the “www-data” user on Ubuntu.\u00a0 To change the owner of the files, you can then run the following commands:<\/p>\n
cd \/var\/www\/rainloop\r\nchown -R www-data:www-data .<\/pre>\n<\/span>Step 3: Configure Apache\/Nginx<\/span><\/h2>\nIn this step, we will show you how to create a virtual host file in Apache or Nginx – the procedure depends on which web server you have running on your system. This is so that you can access your RainLoop installation from your browser.<\/p>\n
Apache<\/h3>\n
Create the virtual host file by executing the following command:<\/p>\n
nano \/etc\/apache2\/sites-available\/rainloop.conf<\/pre>\nThen enter the following information:<\/p>\n
<VirtualHost *:80>\r\n ServerName webmail.mydomain.com<\/span>\r\n DocumentRoot \"\/var\/www\/rainloop\/\"\r\n\r\n ErrorLog \"\/var\/log\/apache2\/rainloop_error_log\"\r\n TransferLog \"\/var\/log\/apache2\/rainloop_access_log\"\r\n\r\n <Directory \/>\r\n Options +Indexes +FollowSymLinks +ExecCGI\r\n AllowOverride All\r\n Order deny,allow\r\n Allow from all\r\n Require all granted\r\n <\/Directory>\r\n\r\n <Directory \/var\/www\/rainloop\/data>\r\n Options -Indexes\r\n Deny from all\r\n <\/Directory>\r\n<\/VirtualHost><\/pre>\nIn our example, we decided to use a subdomain called webmail.mydomain.com<\/span><\/code> for accessing our RainLoop. Make sure to replace mydomain.com<\/span><\/code> with your actual domain name.<\/p>\nTo enable the new RainLoop virtual host, run the following command:<\/p>\n
a2ensite rainloop.conf<\/pre>\nYou should see the following output:<\/p>\n
Enabling site rainloop.\r\nTo activate the new configuration, you need to run:\r\nsystemctl reload apache2<\/pre>\nReload your Apache in order to activate the new configuration:<\/p>\n
systemctl reload apache2<\/pre>\nNginx<\/h3>\n
Create the virtual host file by executing the following command:<\/p>\n
nano \/etc\/nginx\/sites-available\/rainloop.conf<\/pre>\nserver {\r\n listen 80;\r\n\r\n server_name webmail.mydomain.com<\/span>;\r\n root \/var\/www\/rainloop;\r\n\r\n index index.php;\r\n \r\n access_log \/var\/log\/nginx\/rainloop_access.log;\r\n error_log \/var\/log\/nginx\/rainloop_error.log;\r\n\r\n location \/ {\r\n try_files $uri $uri\/ \/index.php?$query_string;\r\n }\r\n\r\n location ~ \\.php$ {\r\n fastcgi_index index.php;\r\n fastcgi_split_path_info ^(.+\\.php)(.*)$;\r\n fastcgi_keep_conn on;\r\n fastcgi_pass unix:\/var\/run\/php\/php7.2-fpm.sock;\r\n include \/etc\/nginx\/fastcgi_params;\r\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n }\r\n location ~ \/\\.ht {\r\n deny all;\r\n }\r\n\r\n location ^~ \/data {\r\n deny all;\r\n }\r\n}<\/pre>\nIn our example, we decided to use a subdomain called webmail.mydomain.com<\/span><\/code> for accessing our Rainloop. Make sure to replace mydomain.com<\/span><\/code> with your actual domain name.<\/p>\nTo enable the server configuration that we just created, run the following command:<\/p>\n
ln -s \/etc\/nginx\/sites-available\/rainloop.conf \/etc\/nginx\/sites-enabled\/rainloop.conf<\/pre>\nTo check for any Nginx configuration errors, run the following command:<\/p>\n
nginx -t<\/pre>\nIf there are no errors, you should get the following output:<\/p>\n
nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\nYou can now reload Nginx in order to activate the new configuration:<\/p>\n
systemctl reload nginx<\/pre>\n