【问题标题】:roundcube owncloud apache nginxroundcube owncloud apache nginx
【发布时间】:2013-10-22 17:15:13
【问题描述】:

我们运行必须可独立访问的 roundcubemail 和 owncloud。 Owncloud 通过带有 url $rcmail_config['owncloud_url'] = 'https://webmail.whitecube.com/owncloud'; 的插件显示在 roundcubemail 中。 - 此 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.

实现这一目标的最佳方法是什么?

我可以将 / 别名为 /roundcubemail 吗?

我应该重写 URL 并附加 roundcubemail 吗?

或者我应该重定向?

我有两个问题,首先要采取什么方法,其次是命令的语法。我必须通过 Nginx 使网站在内部和外部可用,并且已经用谷歌搜索和搜索,并且离精巧这一点还差得远。非常感谢您收到的任何提示或帮助。

【问题讨论】:

    标签: apache nginx roundcube owncloud


    【解决方案1】:

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

    要通过 nginx 访问您的 webmail roundcube 而无需输入整个 url,
    只需在 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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-19
      • 1970-01-01
      • 2021-01-16
      • 1970-01-01
      • 2015-09-03
      相关资源
      最近更新 更多