[已解决]求助:ubuntu18.04 服务器配置Nginx后在WEB页面编辑文件无法保存

一路磕磕碰碰总算把Nginx给装上了然后发现帮助文档里关于配置Nginx反向代理的那片文,少了一些东西,我死活调不通,结果在百度搜,发现还是默认的配置文件有问题,这些先不说了,我有空整理一下开个新帖吧。

主要求助:(seafile专业版)
问题:
1.在内网客户机的web界面,在私人资料库里创建一个文本文件,并编辑,点右上角保存按钮,那个按钮一直转但不不保存。
2. 在客户端的云端浏览器无法上传新文件,但编辑已有(已经同步)的文件正常
3. 在客户机上,上传用户头像正常,设置里能看到,但右上角头像显示不出来,点头像选查看图象,报错
``(http://127.0.0.1:8000/media/avatars/9/a/7a31d5e27bdbe9e1c8beb22cb43e1e/resized/72/74eb9a19e3038463a7724b240f33cc1.png)
4. 客户机上客户端,头像也是无法显示

排除:

  1. 客户机客户端同步正常,修改后同步也正常,新建文件,修改保存同步也正常(云端浏览器不正常)。
  2. 在服务器上(为了研究专门装了桌面测试) WEB界面都正常(用127.0.0.1:8000访问)反应很快

怀疑还是Nginx没配置好,有没有遇到这种情况的朋友支个招??

Seafile.conf文件内容:

log_format seafileformat ‘$http_x_forwarded_for $remote_addr [$time_local] “$request” $status $body_bytes_sent “$http_referer” “$http_user_agent” $upstream_response_time’;

server {
listen 80;
server_name 10.0.0.50;

proxy_set_header X-Forwarded-For $remote_addr;

location / {
     proxy_pass         http://127.0.0.1:8000;
     proxy_set_header   Host $host;
     proxy_set_header   X-Real-IP $remote_addr;
     proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header   X-Forwarded-Host $server_name;
     proxy_set_header   X-Forwarded-Proto $scheme;
     proxy_read_timeout  1200s;

     # used for view/edit office file via Office Online Server
     client_max_body_size 0;

     access_log      /var/log/nginx/seahub.access.log seafileformat;
     error_log       /var/log/nginx/seahub.error.log;
}

location /seafhttp {
     rewrite ^/seafhttp(.*)$ $1 break;
     proxy_pass http://127.0.0.1:8082;
     client_max_body_size 0;
     proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_connect_timeout  36000s;
     proxy_read_timeout  36000s;
     proxy_request_buffering    off;

    access_log      /var/log/nginx/seafhttp.access.log seafileformat;
    error_log       /var/log/nginx/seafhttp.error.log;
}
location /media {
    root /opt/seafile/seafile-server-latest/seahub;
}
location /seafdav {
    fastcgi_pass    127.0.0.1:8080;
    fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
    fastcgi_param   PATH_INFO           $fastcgi_script_name;
    fastcgi_param   SERVER_PROTOCOL     $server_protocol;
    fastcgi_param   QUERY_STRING        $query_string;
    fastcgi_param   REQUEST_METHOD      $request_method;
    fastcgi_param   CONTENT_TYPE        $content_type;
    fastcgi_param   CONTENT_LENGTH      $content_length;
    fastcgi_param   SERVER_ADDR         $server_addr;
    fastcgi_param   SERVER_PORT         $server_port;
    fastcgi_param   SERVER_NAME         $server_name;
    fastcgi_param   REMOTE_ADDR         $remote_addr;

    client_max_body_size 0;

    access_log      /var/log/nginx/seafdav.access.log seafileformat;
    error_log       /var/log/nginx/seafdav.error.log;
}

}

问题更新与解决

  1. 在服务器上WEB里,把系统设置里的两个地址都改为我实际访问的地址(第一个服务器地址加端口号8000) 云端浏览器上传文件和在线编辑文件无法保存的问题解决了,但头像还是无法显示。

解决:
Nginx里配置的主机名:server_name 10.0.0.50; OK, 用管理员登录Seafile的WEB页面,把服务器地址都改成这个,不带端口, :
SERVICE_URL: http://10.0.0.50
FILE_SERVER_ROOT:http://10.0.0.50/seafhttp
重启服务器
头像问题解决!