Rainloop是一个使用PHP编写的,开源免费的网页邮件客户端。他支持包括Google、Yahoo、OutLook在内的主流的邮件服务器,当然,他也支持你自己的本地邮件服务器。它看起来大致就像使用IMAP和SMTP协议的MUA(邮件客户端)一样。 RainLoop 示例 可以看一下RainLoop作者安装的演示页面: http://demo.rainloop.net/。  在Arch Linux上安装RainLoop 一旦在您的服务器部署上Rainloop,剩余要做的唯一的事情是通过Web浏览器访问您的Rainloop,并提供你正在使用的邮件服务器信息。 本教程包含了在 Arch Linux上的Rainloop 网页客户端的安装流程,包括如何进行配置 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. 假设你已经如上面介绍的链接所述,配置好了您的服务器(Nginx或Apache),你需要做的第一件事是在Hosts文件里创建一个原始解析记录,以指向的Arch Linux系统的IP。 对于Linux系统,修改 /etc/hosts 文件并且在你的localhost条目之下添加 Rainloop 的虚拟域。如下: - 127.0.0.1 localhost.localdomain localhost rainloop.lan
- 192.168.1.33 rainloop.lan
 添加域信息 如果是Windows系统,则修改 C:/Windows/System32/drivers/etc/hosts 并且将接下来的内容添加到你的文件里: - 192.168.1.33 rainloop.lan
2. 使用 ping 命令确认本地的 Rainloop 域名创建成功之后,然后在 Apache 或 Nginx 中创建所需的 虚拟主机 和 SSL 配置。 Nginx 虚拟主机 在/etc/nginx/sites-available/ 目录下使用如下命令创建一个名叫rainloop.lan的文件: - $ sudo nano /etc/nginx/sites-available/rainloop.conf
添加如下的文件内容: - server {
- listen 80;
- server_name rainloop.lan;
-
- rewrite ^ https://$server_name$request_uri? permanent;
- access_log /var/log/nginx/rainloop.lan.access.log;
- error_log /var/log/nginx/rainloop.lan.error.log;
- root /srv/www/rainloop/;
-
- # serve static files
- location ~ ^/(images|javascript|js|css|flash|media|static)/ {
- root /srv/www/rainloop/;
- expires 30d;
- }
-
- location / {
- index index.html index.htm index.php;
- autoindex on;
- autoindex_exact_size off;
- autoindex_localtime on;
- }
-
- location ^~ /data {
- deny all;
- }
-
- location ~ /.php$ {
- #fastcgi_pass 127.0.0.1:9000; (depending on your php-fpm socket configuration)
- fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- include fastcgi.conf;
- }
- }
接下来创建SSL配置文件: - $ sudo nano /etc/nginx/sites-available/rainloop-ssl.conf
添加如下内容: - server {
- listen 443 ssl;
- server_name rainloop.lan;
-
- ssl_certificate /etc/nginx/ssl/rainloop.lan.crt;
- ssl_certificate_key /etc/nginx/ssl/rainloop.lan.key;
- ssl_session_cache shared:SSL:1m;
- ssl_session_timeout 5m;
- ssl_ciphers HIGH:!aNULL:!MD5;
- ssl_prefer_server_ciphers on;
-
- access_log /var/log/nginx/rainloop.lan.access.log;
- error_log /var/log/nginx/rainloop.lan.error.log;
-
- root /srv/www/rainloop/;
-
- # serve static files
- location ~ ^/(images|javascript|js|css|flash|media|static)/ {
- root /srv/www/rainloop/;
- expires 30d;
- }
-
- location ^~ /data {
- deny all;
- }
-
- location / {
- index index.html index.htm index.php;
- autoindex on;
- autoindex_exact_size off;
- autoindex_localtime on;
- }
-
- location ~ /.php$ {
- #fastcgi_pass 127.0.0.1:9000; (depending on your php-fpm socket configuration)
- fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- include fastcgi.conf;
- }
- }
接下来将会自动生成Certificate和Keys文件,然后在文件中叫Common Name*的证书里中添加您的虚拟域名(rainloop.lan**)。 - $ sudo nginx_gen_ssl.sh
 生成证书和密钥 生成证书和SSL密钥后,创建Rainloop Web服务器根的文件路径(Rainloop PHP文件所在的位置),然后启用虚拟主机,并重新启动Nginx的守护进程,应用配置。 - $ sudo mkdir -p /srv/www/rainloop
- $ sudo n2ensite rainloop
- $ sudo n2ensite rainloop-ssl
- $ sudo systemctl restart nginx
 创建RainLoop 网页向导 Apache 虚拟主机 在/etc/httpd/conf/sites-available/中创建 rainloop.conf文件: - $ sudo nano /etc/httpd/conf/sites-available/rainloop.conf
添加如下内容: - <VirtualHost *:80>
- ServerName rainloop.lan
- DocumentRoot "/srv/www/rainloop/"
- ServerAdmin [email protected]
- ErrorLog "/var/log/httpd/rainloop-error_log"
- TransferLog "/var/log/httpd/rainloop-access_log"
- <Directory />
- Options +Indexes +FollowSymLinks +ExecCGI
- AllowOverride All
- Order deny,allow
- Allow from all
- Require all granted
- </Directory>
- </VirtualHost>
 创建Apache虚拟主机 为Apache添加SSL支持: - $ sudo nano /etc/httpd/conf/sites-available/rainloop-ssl.conf
添加如下文件内容: - <VirtualHost *:443>
- ServerName rainloop.lan
- DocumentRoot "/srv/www/rainloop/"
- ServerAdmin [email protected]
- ErrorLog "/var/log/httpd/rainloop-ssl-error_log"
- TransferLog "/var/log/httpd/rainloop-ssl-access_log"
-
- SSLEngine on
- SSLCertificateFile "/etc/httpd/conf/ssl/rainloop.lan.crt"
- SSLCertificateKeyFile "/etc/httpd/conf/ssl/rainloop.lan.key"
-
- <FilesMatch "/.(cgi|shtml|phtml|php)$">
- SSLOptions +StdEnvVars
- </FilesMatch>
-
- BrowserMatch "MSIE [2-5]" /
- nokeepalive ssl-unclean-shutdown /
- downgrade-1.0 force-response-1.0
-
- CustomLog "/var/log/httpd/ssl_request_log" /
- "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x /"%r/" %b"
-
- <Directory />
- Options +Indexes +FollowSymLinks +ExecCGI
- AllowOverride All
- Order deny,allow
- Allow from all
- Require all granted
- </Directory>
- </VirtualHost>
接下来将会自动生成Certificate和Keys文件,然后在文件中叫Common Name*的证书里中添加您的虚拟域名(rainloop.lan**)。 - $ sudo apache_gen_ssl
 创建SSL证书和密钥  输入组织信息 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 所指向的目录,之后激活虚拟主机,并且重启Apache应用设置。 - $ sudo mkdir -p /srv/www/rainloop
- $ sudo a2ensite rainloop
- $ sudo a2ensite rainloop-ssl
- $ sudo systemctl restart httpd
 激活虚拟主机 本文地址:http://linux.cn/article-3232-1.html |