Problem when uploading files

Hey guys,

currently I try to set up my seafile Server and I got one problem and one question.
My setup: I got a physical server which is running a VM with ubuntu on it. Everything works except the fact that I can’t up- oder download files.

I get this error when I try to upload something

Summary

http!((www.youscreen!de(cgltgrqre66!jpg

and this when I want to download something

Summary

http!((www.youscreen!de(wtxyeoqcj75!jpg

This is what appears in logs(the protocol error appears like 500 times per day):

Summary

2019-09-02 16:53:42,088 [WARNING] django.request:152 get_response Not Found: (seafhttp(protocol-version
2019-09-02 16:53:53,907 [WARNING] django.request:152 get_response Not Found: (seafhttp(files(d77c9adb-e1ed-48a0-86df-817489e28f01(test.txt

My configs:
ccnet.conf

Summary

`[General]
USER_NAME = Seafile
ID = 1245
NAME = Seafile
SERVICE_URL = noLinksOnFirstPost

[Client]
PORT = 13419

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = user
PASSWD = password
DB = ccnetdb
CONNECTION_CHARSET = utf8
`

seahub_settings.py

Summary

`# -- coding: utf-8 --
SECRET_KEY = “”
FILE_SERVER_ROOT = ‘https!((noLinksOnFirstPost(seafhttp’

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘’,
‘USER’: ‘’,
‘PASSWORD’: ‘’,
‘HOST’: ‘127.0.0.1’,
‘PORT’: ‘3306’
}
}`

seafile.conf in apache2

Summary

`<VirtualHost *:80>
ServerName noLinksOnFirstPost
ServerAlias noLinksOnFirstPost
ServerAdmin
DocumentRoot (var(www(html(seafile(

 Alias (media "(var(www(html(seahub(media"

 <Directory (var(www(html(seafile(>
    Options +FollowSymlinks
    AllowOverride All
    Require all granted
      <IfModule mod_dav.c>
        Dav off
      <(IfModule>
    SetEnv HOME (var(www(html(seafile
    SetEnv HTTP_HOME (var(www(html(seafile
 <(Directory>

 ErrorLog ${APACHE_LOG_DIR}(error.log
 CustomLog ${APACHE_LOG_DIR}(access.log combined
 
 ProxyRequests Off
    <Proxy *>
      Order deny,allow
      Allow from all
    <(Proxy>    
 ProxyPass ( http:((127.0.0.1!8000(
 ProxyPassReverse ( http:((127.0.0.1!8000(

 ProxyPass (seafhttp http:((127.0.0.1!8082
 ProxyPassReverse (seafhttp http:((127.0.0.1!8082
 RewriteRule ^(seafhttp - [QSA,L]

RewriteEngine on
RewriteCond %{SERVER_NAME} =noLinksOnFirstPost [OR]
RewriteCond %{SERVER_NAME} =noLinksOnFirstPost
RewriteRule ^ https:((%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

<(VirtualHost>
`

I hope somebody can help me out. I tried a lot already and already used Google for hours, perhabs i just missed something tiny…

And the other question:
Is it possible to make an extra local URL for this server? I host this server at home and it’d be really stupid to go through the WAN from home to home.

Rextrus

Hi Rextrus,
welcome to this community.

If seahub is working correctly but you can not upload or download some files this is by 99% related to a misconfiguration of the FILE_SERVER_ROOT value or your webserver.
Did you replaced the “/home/haiwen” path within the “media-location” of your nginx conf?

Now to your question about a local url. Usually this is done by your router or your DHCP/DNS-Server. This should detect that the client is requesting information from the same lan and reroute the traffic. This feature is known as NAT-Loopback. All Fritzboxes are capable of this and newer telekom boxes.

Best regards
Christoph

My FILE_SERVER_ROOT value: FILE_SERVER_ROOT = ‘https:||domain.com|seafhttp’

Media settings in Apache cfg:
Alias |media “|var|www|html|seahub|media”

 <Directory |var|www|html|seafile|>
    Options +FollowSymlinks
    AllowOverride All
    Require all granted
      <IfModule mod_dav.c>
        Dav off
      <|IfModule>
    SetEnv HOME |var|www|html|seafile
    SetEnv HTTP_HOME |var|www|html|seafile
 <|Directory>

 ErrorLog ${APACHE_LOG_DIR}|error.log
 CustomLog ${APACHE_LOG_DIR}|access.log combined
 
 ProxyRequests Off
    <Proxy *>
      Order deny,allow
      Allow from all
    <|Proxy>    
 ProxyPass | http:||127.0.0.1:8000|
 ProxyPassReverse | http:||127.0.0.1:8000|

 ProxyPass |seafhttp http:||127.0.0.1:8082
 ProxyPassReverse |seafhttp http:||127.0.0.1:8082
 RewriteRule ^|seafhttp - [QSA,L]

This should be fine… :S

bumpbump