I upgraded to 6.2.5 the last days which worked fine. Now I try to switch to wsgi from fastcgi as suggested but the UI doesn’t work.
My config:
raspbian stretch, nginx, sqlite
I changed the nginx seafile config as suggested in the manual and removed fastcgi from starting seahub.
When I try to login with https://seafileHostName:seafilePort which works with fastcgi after some time I get a timeout and notice the url in he browser changed to https://seafileHostName/accounts/login?next=/
Actually that’s incorrect because it has to be https://seafileHostName:seafilePort/api2/accounts/login?next=/ When I call this updated REST endpoint via curl I get a reply.
Looks like there is some nginx forwarding issue Does somebody have an idea or hint what may be wrong?
Thank you very much for four quick reply. But does this mean it’s not possible to use seafdav with wsgi any more? If yes I have to stick with fastcgi because I need seafdav
I just detected the UI doesn’t work any more with WSGI and spent some time to find the root cause why it deosn’t work any more.
If you flip between WSGI and FCGI mode on the server you have to clean your browser cache. That’s why I thought UI works with WSGI. When I switched from FCGI to WSGI the UI worked. When I cleared the browser cache it didn’t work any more
WSGI usage for seafdav works perfectly if you follow the doc and change nginx according the tutorial. It didn’t work because I screwed up the configs when switching between UI and seafdav WSGI/FCGI mode back and forth
So now my server still runs FCGI for UI and WSGI for seafdav using nginx port <> 80.
Then I changed my non standard nginx port to 80, configured WSGI for UI and everythings works fine (I also cleared the browser cache )
This proved my previous guess is right:
"When I try to login with https://seafileHostName:nginxPort which works with fastcgi after some time I get a timeout and notice the url in the browser changed to https://seafileHostName/accounts/login?next=/
Actually that’s incorrect because it has to be https://seafileHostName:nginxPort/accounts/login?next=/ which I get when I use FCGI. The nginx portnumber is lost "
Actually it seems to be either a missing config statement or a coding issue because the redirection to the login page looses the port number. I’m not familiar with nginx but tried different config changes to make sure port is not lost but failed
Does somebody know what I have to change in the nginx config or should I open an issue for this?
@shoeper I frankly wasn’t aware this doc can/should be updated by the community. Regarding the seafdav and WSGI it’s missing the nginx changes mentioned in the tutorial. Looks like @res80 also didn’t know about this
@DerDanilo Thank you very much for the link. I’m going to provide feedback the next days via PM
Thank you very much for the interesting link. Actually I already tried to use the hard coded port in the host statement which didn’t work and the variable also doesn’t work
But … the original thread for this doc update request (in German) helped me to find the root cause for the issue:
I used “SITE_BASE=‘http://mySeafileURL’” in seahub_settings.py all the time and it worked fine with FCGI. But for WSGI I have to change it into “SITE_BASE=‘http://mySeafileURL:myPort’”.
Now I can use WGSI for UI and seafdav successfully
There are multiple places you have to update when you want to use a non standard port but unfortunately I forgot one. I checked the doc but I failed to find any description how to use a non standard port. I also didn’t find the update with $server_port in WSGI mode I don’t know nginx in detail but as far as I understand $server_port in host can be used all the time - whether port 80 or a non standard port ist used.
Thank you very much @all helping me to solve this ugly issue with WSGI.
Thanks for the hint to @framp and @shoeper, I really didn’t know that.
I started this tutorial actually as a question, then answered it myself by playing around with nginx and changed the title to tutorial afterwards, hoping that the devs would include it in the manual.