texxasrulez / roundcube-plugin-nextcloud

28 stars 13 forks source link

Can't access nextcloud #14

Closed zhaoxiasan closed 1 year ago

zhaoxiasan commented 1 year ago

My server uses nginx instead of apache. Nextcloud and Roundcube are with the same IP. nextcloud is at https://cloud.domain.com roundcube is at https://mail.domain.com

I modified configuration for roundcube by adding the following:

location /cloud {
    proxy_set_header X-Forwarded-Host   IP_address;
    proxy_set_header X-Forwarded-Server    IP_address;
    proxy_set_header X-Forwarded-For   IP_address;

    proxy_pass https://cloud.domain.com;
}

And the following has been added to config.php of my nextcloud:

'overwritewebroot' => '/', 'trusted_proxies' => array ('cloud.domain.com','mail.domain.com'), 'roundcube_nextcloud_des_key' => 'iol1u2h8u9b6y5f2f1s1c6x9', 'overwrite.cli.url' => 'https://cloud.domain.com',

I tried to click "CLOUD" menu then I got a empty page inside the roudecube frame. I tried visit https://mail.domain.com/cloud, then I saw the following error message: " Nextcloud Access through untrusted domain Please contact your administrator. If you are an administrator, edit the "trusted_domains" setting in config/config.php like the example in config.sample.php. "

Could you please help me and tell me where is my mistake? Thanks.