Serverroot problems nginx location /seafile

Any Idea why an nginx

location / {
proxy_pass http;127.0.0.1;8000;

is OK but

location /seafile {
proxy_pass http;127.0.0.1;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.

seafile-server-8.0.3-buster

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_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 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
server#dash#com/xwiki
server#dash#com/bb
server#dash#com/seafile

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?
https://haiwen.github.io/seafile-admin-docs/deploy/deploy_seahub_at_non-root_domain/

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 seahub_settings.py and nginx default with:
https://haiwen.github.io/seafile-admin-docs/deploy/deploy_seahub_at_non-root_domain/
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 {

to:

  • 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
and
https://manual.seafile.com/deploy/deploy_seahub_at_non-root_domain/
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.

Moaning…
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 seafile.some.com which jails you to a specific SSL.

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

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