Csrf 403 error when try login

cant login

Most likely some policies set in the reverse proxy. Do not configure stuff you don’t understand. I’ve seen it tons of times here, that people break their install by configuring shit.

1 Like

i use config from seafile manual, no modding

Check out the Community manual.

i did it just now

Summary

proxy_set_header X-Forwarded-For $remote_addr;

location /seafile {
     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;
     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;
}

location /seafmedia {
    rewrite ^/seafmedia(.*)$ /media$1 break;
    root /home/ubuntu/seafile-server-latest/seahub;
}

no effect

Please show us the whole nginx config, including security settings.

What else should i show?

I would like to see your full seafile and ssl config.(combined) What is cloud.tmpl for?

Cloud.tmpl is nextcloud , i send all config, full ssl, full seafile

any body heeeeeelp meeeeee

You need to chill, most of us are busy with their jobs. We can help when we have time.

Now we know that you use Seafile in a subfolder.
Did you change the seafile config accordingly?

1 Like

i think yes, i change ccnet.conf, seahub_setting.py and nginx like written in manual

The screenshot says your client doesn’t send a referer…

i see, but i cant find how to manage it

[General]
USER_NAME = Kabinet
ID =
NAME = Kabinet
SERVICE_URL = https://kabinet56.ru/seafile

[Client]
PORT = 13419

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER =
PASSWD =
DB =
CONNECTION_CHARSET = utf8

ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False
ONLYOFFICE_APIJS_URL = ‘https://kabinet56.ru:4443/web-apps/apps/api/documents/api.js
ONLYOFFICE_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’)
ONLYOFFICE_EDIT_FILE_EXTENSION = (‘docx’, ‘pptx’, ‘xlsx’)
SERVE_STATIC = False
MEDIA_URL = ‘/seafmedia/’
SITE_ROOT = ‘/seafile/’
LOGIN_URL = ‘/seafile/accounts/login/’
COMPRESS_URL = MEDIA_URL
STATIC_URL = MEDIA_URL + ‘assets/’
FILE_SERVER_ROOT = ‘https://kabinet56.ru/seafhttp
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘seahub-db’,
‘USER’: ‘’,
‘PASSWORD’: ‘’,
‘HOST’: ‘127.0.0.1’,
‘PORT’: ‘3306’
}
}

add this to conf file
proxy_set_header Referer “https://kabinet56.ru/seafile”;
and errore gone

which conf file ? nginx.conf ?