roundcube owncloud apache nginx

时间:2013-10-22 17:15:13

标签: apache nginx roundcube owncloud

我们运行roundcubemail和owncloud,必须独立访问。 Owncloud通过插件显示在roundcubemail内,其中包含url $ rcmail_config [' owncloud_url'] =' https://webmail.whitecube.com/owncloud' - 此URL无法更改或插件中断。它无法指向cloud.example.com或者它会中断。我不得不将rouncube的webroot设置为" / var / www / html /"这样服务器就可以访问roundcubemail和owncloud。

<VirtualHost 172.21.11.48:443>
    ServerAlias      "webmail.example.com"
    DocumentRoot    "/var/www/html/"
</VirtualHost>  

<VirtualHost 172.21.11.48:443>
   ServerAlias   "cloud.whitecube.com"
   DocumentRoot    "/var/www/html/owncloud"
 </VirtualHost>

设置有效,但用户必须输入

       http://webmail.example.com/rouncubemail, I'd like to make it available on 
       http://webmail.whitecube.com.

最好的方法是什么?

我可以别名/ to / roundcubemail吗?

我应该重写网址并附加roundcubemail吗?

或者我应该重定向?

我有两个问题,首先是采取什么方法,其次是命令的语法。我必须通过Nginx在内部和外部提供网站,并使用Google搜索和Google搜索,并且不会更接近于此。最感激的任何提示或帮助。

1 个答案:

答案 0 :(得分:0)

我不确定你的问题是什么,因为你显示了apache虚拟主机配置部分..

要通过nginx访问您的网络邮件圆形框而不输入整个网址,只需在nginx配置中指定索引字段,这是nginx的示例配置:

server {
    server_name webmail.example.com;
    root /var/www/html/;
    index index.html index.htm index.php;
    location  ~ [^/]\.php(/|$){
             try_files $uri $uri/ /index.php;
             fastcgi_split_path_info ^(.+?\.php)(/.*)$;
             if (!-f $document_root$fastcgi_script_name) {return 404;}
             fastcgi_pass unix:/var/run/php5-fpm.sock;
             fastcgi_index index.php;
             include fastcgi_params;
     }
}

此处的location部分配置为将任何file.php传递给unix套接字:
unix:/var/run/php5-fpm.sock