Serverroot problems nginx location /seafile

Any Idea why an nginx

location / {
proxy_pass http;;8000;

is OK but

location /seafile {
proxy_pass http;;8000;

gives me: Sorry, but the requested page could not be found.

I consider this as an abnormal behavour because whatever I try to configure at conf dir it won’t work.


sorry but this link restriction is a problem to insert a proper http…

And the next problem will be to proxy.public >> proxy.local >> proxy.seafile_server
without proper seafhttp and media locations.

sorry but this link restriction is a problem to insert a proper http…

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

you put


instead of


link restriction problem of forum and yes everything else identical to your post.
Main problem is the documentation is only for seafile#dash#server#dash#ccom and not for server#dash#com/seafile which is an asset to implement the seafile server into an infrastructure like

and I did change SERVICE_URL and FILE_SERVER_ROOT to all possible varieties.

The funny thing is with seafile 7 I have a working configuration for http. So guess what I did?
Yes copy the v7 config items exactly to v8 but did not work as expected.

Have you seen this?

Yes and the ccnet.conf parameters are interresting BUT the main problem is: "How old is this manual page? Version2.2 haiwen or guess? I am on Server Version: 8.0.3

well yes it was a good guess in advance, mangled up and nginx default with:
servers working, access all dead, not even via :8000.

Possibly a regex in your nginx configuration catches the request instead of your location /seafile {.

Make sure that regular expression matching will not take place if those paths are the best non regular expression match with using a caret and tilde modifier in front of the paths.

Change those three lines:

  • location /seafile {
  • location /seafhttp {
  • location /seafmedia {


  • location ^~ /seafile {
  • location ^~ /seafhttp {
  • location ^~ /seafmedia {

Don’t forget to let nginx reload its configuration with nginx -s reload after you changed the according lines.

[Bernie_O] I will check it out and revert.
Meanwile, with a little help of
Nginx Subdir und Seafile, das leidige Thema, brauche Hilfe
I managed to get /seafile but somehow I was already logged in. So I looged out and logged in again: Forbidden (403) CSRF verification failed. Request aborted.

Looks like a jango issue.

Sorry folks but it is really mind blowing. It took me weeks to solve it at 7.1
and now again weeks to solve it at 8.x

And I think the problems are due to the seafile static links and the use of “external” direcotries (locations)

And of course one wants to proxy.public to proxy.internal which connects to the sub-servers via location directives. I think with VM’s this is a usual requirement and not which jails you to a specific SSL.

Without getting this from the seafile-server, which is, for sure, not a proxy problem:

Oh man, the only serious way to connect shall be
/seafile proxy_pass ‘http://seafile.lan.dom
an notting else.

OK implemented the ^~
but I simpy got stuck at ‘http://seafile.lan.dom/seafile/accounts/login/?next=/seafile/
with: Forbidden (403) CSRF verification failed. Request aborted.
so I could not check if it is working with ^~ or not.

emptied cache with

rm -rf /tmp/seahub_cache/

and browser cache
but no success: still CSRF verification failed