Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用docker安装,然后用nginx做反向代理共用80端口,地址跳转有问题 #983

Closed
zhangziying1998 opened this issue Jan 30, 2020 · 2 comments

Comments

@zhangziying1998
Copy link

背景描述如下
使用docker安装,然后用nginx做反向代理共用80端口,服务器给nextcloud的端口是8010
用nginx把我的域名(pan.xxx.com)反向代理到服务器本地地址(localhost:8010)
问题描述如下:

  1. 部分地址跳转有问题, 跳转到到了http://localhost:8010/xxx (应该跳转到http://pan.xxx.com/xxx)
  2. 页面显示链接错误(凡是像下面这样直接显示链接的都有问题)
    image
  3. 部分图片图标显示不了
    image
    点击之后跳转链接也是
    image
  4. 之前网址挂了ssl证书(现在过期了就没挂了),分享链接复制后问题同上(去除ssl后没有问题)

总的来说,用nginx做反向代理后,网盘系统的地址出现代理的地址,而不是要显示的域名

@suikodev
Copy link

suikodev commented Mar 4, 2020

用nginx-proxy和letsencrypt-nginx-proxy-companion需要配置一下nextcloud, 在config/config/php中添加:

'overwriteprotocol' => 'https'

我加了后解决了你提到的部分图片显示不了以及我碰到的桌面端登陆不了的问题。

具体:

docker exec -it nextcloud /bin/bash
cd config/
vim config.php
insert the line: 'overwriteprotocol' => 'https'

来源:
https://help.nextcloud.com/t/connection-wizard-is-looping-between-log-in-and-grant-access/46809/5

@J0WI
Copy link
Contributor

J0WI commented Feb 19, 2021

6d23907

@J0WI J0WI closed this as completed Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants