0

我们运行必须可独立访问的 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 使网站在内部和外部可用,并且已经谷歌搜索和谷歌搜索,并且离精巧这一点还差得远。非常感激地收到任何提示或帮助。

4

1 回答 1

0

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

要通过 nginx 访问您的 webmail roundcube 而无需输入整个 url,
只需在 nginx 配置中指定 index 字段,这是 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

于 2014-01-23T14:21:09.330 回答