Hi all,
I’ve successfully set up a seafile server on a RP3, which totally works locally and from outside when I use my public IP. The server is configured with the service url to be my public ip, which I port forward locally to my RP3. When I’m on my local network, I just change the ip on my clients from the public ip to the local ip and there’s no issue.
However, my goal is to enable https with let’s encrypt, and the first step was to configure nginx. My current configuration allows me to connect to the server with all my clients and the web interface both on my local network and via the public ip when I’m not on my local network. However, only the macOS client (I haven’t tried windows yet) will actually allow me to add or modify files. I can connect to the server with the iOS client and the web interface, and when I connect I am presented with an accurate listing of my libraries and their contents, but I cannot upload files or make folders. With the web interface, I can delete files, but not upload new ones.
After banging my head against the wall for a few hours now, I would love some help as to how I might be able to enable the iOS client and the web interface to have the same abilities as the macOS client. When I changed my configuration to be entirely local (i.e. service_url = localip, file_server_root = localip/seafhttp, and server_name localip;), everything worked fine, but obviously I was unable to access my server from outside my local network.
Here are my configuration files (very sorry about the formatting, still working that out)
/etc/nginx/sites-available/seafile.conf (sym-linked to sites-enabled as per tutorial):
server {
listen 80;
server_name MYPUBLICIP:8000;
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_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;
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_send_timeout 36000s;
send_timeout 36000s;
}
location /media {
root /mnt/seafile_server/seafile-server-latest/seahub;
}
}
/mnt/seafile_server/conf/ccnet.conf:
[General]
USER_NAME = pi_server
ID = MYID
NAME = pi_server
SERVICE_URL = http://MYPUBLICIP:8000
[Client]
PORT = 13419
/mnt/seafile_server/conf/seahub_settings.py:
# -*- coding: utf-8 -*-
SECRET_KEY = MYSECRETKEY
FILE_SERVER_ROOT = ‘http://MYPUBLICIP:8000/seafhttp’