首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >roundcube apache nginx

roundcube apache nginx
EN

Stack Overflow用户
提问于 2013-10-23 01:15:13
回答 1查看 635关注 0票数 0

我们运行roundcubemail电子邮件和owncloud,它们必须独立访问。Owncloud通过一个带有url $rcmail_config'owncloud_ URL‘=’https://webmail.whitecube.com/owncloud‘的插件显示在roundcubemail电子邮件中;-此URL无法更改或插件中断。它不能指向cloud.example.com,否则它会中断。我不得不将rouncube的webroot设置为"/var/www/html/“,这样服务器就可以同时访问rouncube电子邮件和owncloud。

代码语言:javascript
复制
<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>

设置可以工作,但用户必须进入

代码语言:javascript
复制
       http://webmail.example.com/rouncubemail, I'd like to make it available on 
       http://webmail.whitecube.com.

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

我可以作为/roundcubemail的别名吗?

我是否应该重写URL并附加Should电子邮件?

或者我应该重定向?

我有两个问题,第一是采用什么方法,第二是命令的语法。我必须通过Nginx使网站在内部和外部可用,并已谷歌和谷歌,这是没有更近的精妙。任何建议或帮助,我们都会非常感谢。

EN

回答 1

Stack Overflow用户

发布于 2014-01-23 22:21:09

我不确定您在这里遇到了什么问题,因为您显示了apache虚拟主机配置部分。

要想通过nginx访问你的webmail roundcube而不需要输入整个url,

只需在nginx配置中指定index字段即可,nginx配置示例如下:

代码语言:javascript
复制
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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19524305

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档