我们运行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。
<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并附加Should电子邮件?
或者我应该重定向?
我有两个问题,第一是采用什么方法,第二是命令的语法。我必须通过Nginx使网站在内部和外部可用,并已谷歌和谷歌,这是没有更近的精妙。任何建议或帮助,我们都会非常感谢。
发布于 2014-01-23 22:21:09
我不确定您在这里遇到了什么问题,因为您显示了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
https://stackoverflow.com/questions/19524305
复制相似问题