roundcube云ApacheNginx

roundcube云ApacheNginx,apache,nginx,roundcube,owncloud,Apache,Nginx,Roundcube,Owncloud,我们运行RoundCubeEmail和owncloud,必须独立访问。Owncloud通过url$rcmail\u config['Owncloud\u url']=''的插件显示在RoundCubeEmail中此URL无法更改或插件中断。它不能指向cloud.example.com,否则会中断。我必须将rouncube的webroot设置为“/var/www/html/”,以便服务器可以访问RoundCubeEmail和owncloud <VirtualHost 172.21.11.48

我们运行RoundCubeEmail和owncloud,必须独立访问。Owncloud通过url$rcmail\u config['Owncloud\u url']=''的插件显示在RoundCubeEmail中此URL无法更改或插件中断。它不能指向cloud.example.com,否则会中断。我必须将rouncube的webroot设置为“/var/www/html/”,以便服务器可以访问RoundCubeEmail和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>
实现这一目标的最佳方式是什么

我可以别名/收件人/电子邮件吗

我应该重写URL并附加电子邮件吗

或者我应该重定向


我有两个问题,第一个问题是采取什么方法,第二个问题是命令的语法。我必须通过Nginx让网站在内部和外部都可用,我已经用谷歌搜索了一次又一次,而且我还没有接近完善这个网站。非常感谢您提供的任何提示或帮助。

我不确定您的问题是什么,因为您显示了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;
     }
}
此处的位置部分配置为将任何file.php传递到unix套接字:
unix:/var/run/php5 fpm.sock

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;
     }
}