From 5dbb8a4ad893523b49135476ed103d3e64f0a38c Mon Sep 17 00:00:00 2001 From: Xiretza Date: Mon, 9 May 2022 16:19:03 +0200 Subject: [PATCH] fix(doc): remove outdated uWSGI setup documentation (#139) uWSGI is no longer supported and ASGI must be used instead. --- example-configs/nginx-uwsgi/README.md | 22 ------------ example-configs/nginx-uwsgi/etebase.ini | 15 -------- example-configs/nginx-uwsgi/etesync.ini | 15 -------- .../nginx-uwsgi/my.server.name.conf | 36 ------------------- example-configs/nginx-uwsgi/uwsgi.service | 15 -------- 5 files changed, 103 deletions(-) delete mode 100644 example-configs/nginx-uwsgi/README.md delete mode 100644 example-configs/nginx-uwsgi/etebase.ini delete mode 100644 example-configs/nginx-uwsgi/etesync.ini delete mode 100644 example-configs/nginx-uwsgi/my.server.name.conf delete mode 100644 example-configs/nginx-uwsgi/uwsgi.service diff --git a/example-configs/nginx-uwsgi/README.md b/example-configs/nginx-uwsgi/README.md deleted file mode 100644 index 55b5fa5..0000000 --- a/example-configs/nginx-uwsgi/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# 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 . Also that static -files have been collected at `/srv/http/etebase_server` by running the following commands: - -```shell -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. diff --git a/example-configs/nginx-uwsgi/etebase.ini b/example-configs/nginx-uwsgi/etebase.ini deleted file mode 100644 index a2ebe97..0000000 --- a/example-configs/nginx-uwsgi/etebase.ini +++ /dev/null @@ -1,15 +0,0 @@ -# uwsgi configuration file -# typical location of this file would be /etc/uwsgi/sites/etebase.ini - -[uwsgi] -socket = /path/to/etebase_server.sock -chown-socket = EtebaseUser:www-data -chmod-socket = 660 -vacuum = true - - -uid = EtebaseUser -chdir = /path/to/etebase -home = %(chdir)/.venv -module = etebase_server.wsgi -master = true diff --git a/example-configs/nginx-uwsgi/etesync.ini b/example-configs/nginx-uwsgi/etesync.ini deleted file mode 100644 index e79eeee..0000000 --- a/example-configs/nginx-uwsgi/etesync.ini +++ /dev/null @@ -1,15 +0,0 @@ -# uwsgi configuration file -# typical location of this file would be /etc/uwsgi/sites/etesync.ini - -[uwsgi] -socket = /path/to/etesync_server.sock -chown-socket = EtesyncUser:www-data -chmod-socket = 660 -vacuum = true - - -uid = EtesyncUser -chdir = /path/to/etesync -home = %(chdir)/.venv -module = etesync_server.wsgi -master = true diff --git a/example-configs/nginx-uwsgi/my.server.name.conf b/example-configs/nginx-uwsgi/my.server.name.conf deleted file mode 100644 index 6b5de6e..0000000 --- a/example-configs/nginx-uwsgi/my.server.name.conf +++ /dev/null @@ -1,36 +0,0 @@ -# nginx configuration for etebase server running on https://my.server.name -# typical location of this file would be /etc/nginx/sites-available/my.server.name.conf - -server { - server_name my.server.name; - - root /srv/http/etebase_server; - - client_max_body_size 20M; - - location /static { - expires 1y; - try_files $uri $uri/ =404; - } - - location /media { - expires 1y; - try_files $uri $uri/ =404; - } - - location / { - uwsgi_pass unix:/path/to/etebase_server.sock; - include uwsgi_params; - } - - # change 443 to say 9443 to run on a non standard port - listen 443 ssl; - listen [::]:443 ssl; - # Enable these two instead of the two above if your nginx supports http2 - # listen 443 ssl http2; - # listen [::]:443 ssl http2; - - ssl_certificate /path/to/certificate-file - ssl_certificate_key /path/to/certificate-key-file - # other ssl directives as needed -} diff --git a/example-configs/nginx-uwsgi/uwsgi.service b/example-configs/nginx-uwsgi/uwsgi.service deleted file mode 100644 index 9941ec3..0000000 --- a/example-configs/nginx-uwsgi/uwsgi.service +++ /dev/null @@ -1,15 +0,0 @@ -# systemd unit for running uwsgi in emperor mode -# typical location of this file would be /etc/systemd/system/uwsgi.service - -[Unit] -Description=uWSGI Emperor service - -[Service] -ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites -Restart=always -KillSignal=SIGQUIT -Type=notify -NotifyAccess=all - -[Install] -WantedBy=multi-user.target