Installing RainLoop Webmail with Nginx/Apache on Arch Linux

RainLoop is an open-source, free webmail client written in PHP. It supports mainstream mail servers including Google, Yahoo, and Outlook, as well as your own local mail server. It essentially looks like an MUA (mail client) using IMAP and SMTP protocols.

RainLoop Demo

Check out the demo page from the RainLoop author: http://demo.rainloop.net/

Installing RainLoop on Arch Linux

Arch LinuxRainLoop

Rainloop,WebRainloop,。

 Arch LinuxRainloop , Apache  Nginx, Hosts,DNS。

If you also need references on installing Rainloop on Debian and Red Hat systems visit the previous RainLoop Webmail article at.

Debian  Red Hat  RainLoop Webmail ,:

 Ubuntu  RainLoop Webmail ,:

Nginx

Apache

Step 1: Nginx Apache

1. ,(NginxApache),Hosts,Arch LinuxIP。

Linux, /etc/hosts localhost Rainloop 。:


  1. 127.0.0.1 localhost.localdomain localhost rainloop.lan
  2. 192.168.1.33 rainloop.lan

Add Domain Host Entry

Windows, C:/Windows/System32/drivers/etc/hosts :


  1. 192.168.1.33 rainloop.lan

2.  ping  Rainloop , Apache  Nginx  Virtual Host  SSL 。

Nginx Virtual Host

/etc/nginx/sites-available/ rainloop.lan


  1. $ sudo nano /etc/nginx/sitesavailable/rainloop.conf


  1. server {
  2. listen 80;
  3. server_name rainloop.lan;
  4.  
  5. rewrite ^ https://$server_name$request_uri? permanent;
  6. access_log /var/log/nginx/rainloop.lan.access.log;
  7. error_log /var/log/nginx/rainloop.lan.error.log;
  8. root /srv/www/rainloop/;
  9.  
  10. # serve static files
  11. location ~ ^/(images|javascript|js|css|flash|media|static)/ {
  12. root /srv/www/rainloop/;
  13. expires 30d;
  14. }
  15.  
  16. location / {
  17. index index.html index.htm index.php;
  18. autoindex on;
  19. autoindex_exact_size off;
  20. autoindex_localtime on;
  21. }
  22.  
  23. location ^~ /data {
  24. deny all;
  25. }
  26.  
  27. location ~ /.php$ {
  28. #fastcgi_pass 127.0.0.1:9000; (depending on your php-fpm socket configuration)
  29. fastcgi_pass unix:/run/phpfpm/phpfpm.sock;
  30. fastcgi_index index.php;
  31. include fastcgi.conf;
  32. }
  33. }

SSL:


  1. $ sudo nano /etc/nginx/sitesavailable/rainloopssl.conf


  1. server {
  2. listen 443 ssl;
  3. server_name rainloop.lan;
  4.  
  5. ssl_certificate /etc/nginx/ssl/rainloop.lan.crt;
  6. ssl_certificate_key /etc/nginx/ssl/rainloop.lan.key;
  7. ssl_session_cache shared:SSL:1m;
  8. ssl_session_timeout 5m;
  9. ssl_ciphers HIGH:!aNULL:!MD5;
  10. ssl_prefer_server_ciphers on;
  11.  
  12. access_log /var/log/nginx/rainloop.lan.access.log;
  13. error_log /var/log/nginx/rainloop.lan.error.log;
  14.  
  15. root /srv/www/rainloop/;
  16.  
  17. # serve static files
  18. location ~ ^/(images|javascript|js|css|flash|media|static)/ {
  19. root /srv/www/rainloop/;
  20. expires 30d;
  21. }
  22.  
  23. location ^~ /data {
  24. deny all;
  25. }
  26.  
  27. location / {
  28. index index.html index.htm index.php;
  29. autoindex on;
  30. autoindex_exact_size off;
  31. autoindex_localtime on;
  32. }
  33.  
  34. location ~ /.php$ {
  35. #fastcgi_pass 127.0.0.1:9000; (depending on your php-fpm socket configuration)
  36. fastcgi_pass unix:/run/phpfpm/phpfpm.sock;
  37. fastcgi_index index.php;
  38. include fastcgi.conf;
  39. }
  40. }

CertificateKeysCommon Name*(rainloop.lan**)。


  1. $ sudo nginx_gen_ssl.sh

SSL,Rainloop Web(Rainloop PHP),,Nginx,。


  1. $ sudo mkdir p /srv/www/rainloop
  2. $ sudo n2ensite rainloop
  3. $ sudo n2ensite rainloopssl
  4. $ sudo systemctl restart nginx

Create RainLoop Web Director

RainLoop

Apache Virtual Host

/etc/httpd/conf/sites-available/ rainloop.conf


  1. $ sudo nano /etc/httpd/conf/sitesavailable/rainloop.conf


  1. <VirtualHost *:80>
  2. ServerName rainloop.lan
  3. DocumentRoot "/srv/www/rainloop/"
  4. ServerAdmin [email protected]
  5. ErrorLog "/var/log/httpd/rainloop-error_log"
  6. TransferLog "/var/log/httpd/rainloop-access_log"
  7. <Directory />
  8. Options +Indexes +FollowSymLinks +ExecCGI
  9. AllowOverride All
  10. Order deny,allow
  11. Allow from all
  12. Require all granted
  13. </Directory>
  14. </VirtualHost>

Create Apache Virtual Host

Apache

ApacheSSL:


  1. $ sudo nano /etc/httpd/conf/sitesavailable/rainloopssl.conf


  1. <VirtualHost *:443>
  2. ServerName rainloop.lan
  3. DocumentRoot "/srv/www/rainloop/"
  4. ServerAdmin [email protected]
  5. ErrorLog "/var/log/httpd/rainloop-ssl-error_log"
  6. TransferLog "/var/log/httpd/rainloop-ssl-access_log"
  7.  
  8. SSLEngine on
  9. SSLCertificateFile "/etc/httpd/conf/ssl/rainloop.lan.crt"
  10. SSLCertificateKeyFile "/etc/httpd/conf/ssl/rainloop.lan.key"
  11.  
  12. <FilesMatch "/.(cgi|shtml|phtml|php)$">
  13. SSLOptions +StdEnvVars
  14. </FilesMatch>
  15.  
  16. BrowserMatch "MSIE [2-5]" /
  17. nokeepalive ssl-unclean-shutdown /
  18. downgrade-1.0 force-response-1.0
  19.  
  20. CustomLog "/var/log/httpd/ssl_request_log" /
  21. "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x /"%r/" %b"
  22.  
  23. <Directory />
  24. Options +Indexes +FollowSymLinks +ExecCGI
  25. AllowOverride All
  26. Order deny,allow
  27. Allow from all
  28. Require all granted
  29. </Directory>
  30. </VirtualHost>

CertificateKeysCommon Name*(rainloop.lan**)。


  1. $ sudo apache_gen_ssl

Create SSL Certificate and Keys

SSL

Enter Organization Details

After the Certificate and SSL keys are created, add Rainloop DocumentRoot path, then enable Virtual Hosts and restart Apache daemon to apply configurations. , RainLoop  DocumentRoot ,,ApacheSettings。


  1. $ sudo mkdir p /srv/www/rainloop
  2. $ sudo a2ensite rainloop
  3. $ sudo a2ensite rainloopssl
  4. $ sudo systemctl restart httpd

Enable Virtual Hosts

Address:http://linux.cn/article-3232-1.html

Leave a Comment

Your email address will not be published.