Welcome! Log In Create A New Profile

Advanced

Apache tweak or Nginx rewrite or... to fix Roundcube Owncloud Plugin Limitations

Posted by Stephen 
Apache tweak or Nginx rewrite or... to fix Roundcube Owncloud Plugin Limitations
October 17, 2013 12:58PM
Hi All

I have a working setup of Apache serving Roundcubemail and Owncloud, proxying through Nginx without fast_CGI.

Users connecting to

https://webmail.example.com must enter https://webmail.example.com/rouncubemail because of the limitations of the Roundcubemail Owncloud plugin that displays owncloud inside roundcubemail.

The only way we have been able to get the plugin to work is to set things up as below:

$rcmail_config['owncloud_url'] = 'http://webmail.example.com/owncloud';

with the corresponding apache vhosts:

<VirtualHost 172.21.11.48:80>
ServerAlias "webmail.example.com"
DocumentRoot "/var/www/html"
</VirtualHost>

<VirtualHost 172.21.11.48:80>
ServerAlias "cloud.example.com"
DocumentRoot "/var/www/html/owncloud"
</VirtualHost>

If roundcubemail is appended to "/var/www/html" as one would expect the plugin stops working. The owncloud URL must be an absolute URL with no subdomains.

and Niginx

server {
listen 443;
root /var/www/html/roundcubemail;
index index.php index.html index.htm;
server_name webmail.example.com;
ssl on;
ssl_certificate /etc/pki/tls/webmail.example.com.crt;
ssl_certificate_key /etc/pki/tls/private/webmail.example.com.key;
ssl_session_timeout 5m;
error_log /var/log/nginx/proxyerrorlog;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+EXP;
ssl_prefer_server_ciphers on;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://172.21.11.48:80;
}
location ~ /\.ht {
deny all;
}
}
So my question is how is this situation best handled? so users can enter https://webmail.example.com.

Can it be fixed with in Nginx or something else. I found the Nginx documentation impenetrable (that regex stuff and my dyslexia ) and have so far only managed to enter a rewrite loop or end up with https://webmail.example.com/index.php/roundcubemail so any tips greatly appreciated.

Regards

Stephen

P.S We can't use fast_CGI becuase the webserver is an IBM s370 and rebuilding it is a royal pain in the ****.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 194
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready