1
0
mirror of https://github.com/etesync/server synced 2024-11-22 16:58:08 +00:00
etesync-server/example-configs/nginx-uwsgi
2020-10-18 17:50:52 +03:00
..
etebase.ini Update example-configs to etebase. 2020-09-10 19:21:22 +03:00
etesync.ini Update example-configs to etebase. 2020-09-10 19:21:22 +03:00
my.server.name.conf Update example-configs to etebase. 2020-09-10 19:21:22 +03:00
readme.md Update example-configs to etebase. 2020-09-10 19:21:22 +03:00
README.md Update example-configs to etebase. 2020-09-10 19:21:22 +03:00
uwsgi.service Add example config for using using nginx with uwsgi 2020-09-10 19:20:21 +03:00

Running etebase under nginx and uwsgi

This configuration assumes that etebase server has been installed in the home folder of a non privileged user called EtebaseUser following the instructions in https://github.com/etesync/server. Also that static files have been collected at /srv/http/etebase_server by running the following commands:

sudo mkdir -p /srv/http/etebase_server/static
sudo chown -R EtebaseUser /srv/http/etebase_server
sudo su EtebaseUser
cd /path/to/etebase
ln -s /srv/http/etebase_server/static static
./manage.py collectstatic

It is also assumed that nginx and uwsgi have been installed system wide by root, and that nginx is running as user/group www-data.

In this setup, uwsgi running as a systemd service as root creates a unix socket with read-write access to both EtebaseUser and nginx. It then drops its root privilege and runs etebase as EtebaseUser.

nginx listens on the https port (or a non standard port https port if desired), delivers static pages directly and for everything else, communicates with etebase over the unix socket.