Closed johentsch closed 3 years ago
You need to run collectstatic
.
See: https://github.com/etesync/server/wiki/Production-setup-using-Nginx#setup-nginx
As stated in the issue I had followed the guide, which also includes the execution of collectstatic
. Restating what is written above, the "not found" files are present under the correct paths assuming that /static/
is replaced by the path specified in the conf file. The issue is not solved.
Ah, I see the problem, the alias is wrong, it should not contain the trailing static/
. Also, you probably want to use root rather than alias, so:
root /home/user/etebase;
location /static/ {
alias /home/user/etebase/static/ ; # Project's static files
}
Or for extra safety:
root /home/user/etebase/www-data;
location /static/ {
try_files $uri $uri/ =404;
}
and put all of the files in www-data
Thanks for the support.
I've now tried the first solution with and without including the trailing static/
in the alias. Also tried the second one, the folder www-data
had not existed before. Both attempts did not solve the issue. Is it sufficient to restart nginx and uvicorn after the changes or is there anything else I need to do?
Can you please come to https://www.etesync.com/community-chat/ and ask there? It's a local configuration issue. You are doing something wrong, and it would be much easier to debug it with real-time chat. We can improve the docs afterwards.
No need to restart uvicorn, just need to restart nginx if changing the nginx config. The most likely issue is that your data is not there (so collectstatic is populating the wrong place). As I said in my comment, www-data is a new name I suggeseted, it didn't already exist.
This is the current version of the config file (needed to change extension): etebase_nginx.conf.txt
ls /home/hentsche/etebase/www-data
admin
OK, so do this:
Change the nginx config from root /home/hentsche/etebase/www-data;
to root /home/hentsche/etebase/;
and restart nginx. It should now work.
One more thing is to verify that nginx has access to this directory (in case it dosen't work).
Unfortunately, nothing changed. I've also asked in the chat and we tried with copying static to /tmp/static and made the user http
(which runs the nginx worker) the owner. By now I have tried so many constellations that I start doubting nginx is caring at all about what I write in the config file.
It's 99.999% you doing something wrong and we just haven't figured out what. You'd probably be more lucky trying to chat with the nginx community. Anyhow, I'm closing this ticket as it's really not an issue with the server. We have many instances using nginx, and things work as expected.
Hey folks,
Thanks for this great project, I'm excited to set up my own etebase on a Raspberry 3 B+ running
5.10.36-1-MANJARO-ARM
! Followed the docs for setting it up running on port 8001 and managed to connect via the etesync app on my google-free phone.The issue is that the app server doesn't seem to see the static path specified in the config file. It keeps logging errors such as
meaning that the admin page works but looks very black and white. However, the requested files are in the static folder which has read permissions for everyone. The entry in my
etebase_nginx.conf
readsAny idea what could be the trouble? Let me know if you need more info.
Thanks and cheers!