add etesync template (#64)

@muppeth I don't manage to add frontend to for example https://etesync.example.org/web

I tried to add something like:

```
location /web {
        alias /var/www/etesync-web/;
        index index.html;
}

```

But the static files give error 404.

Also, at the moment, access to https://etesync.example.org gives that generic page:
```
It works!

Please refer to the README to complete the final steps if you haven't done so already.
```

I don't know how to properly remove that by etesync-web

Reviewed-on: #64
Reviewed-by: muppeth <muppeth@no-reply@disroot.org>
Co-authored-by: meaz <meaz@no-reply@disroot.org>
Co-committed-by: meaz <meaz@no-reply@disroot.org>
This commit is contained in:
meaz 2024-07-04 11:20:44 +02:00 committed by muppeth
parent 0dfa370f56
commit 85634f409e

View file

@ -0,0 +1,35 @@
# the upstream component nginx needs to connect to
upstream etebase {
server unix:///tmp/etebase_server.sock; # for a file socket
# server {{ item.upstream_name }}:{{ item.upstream_port }}; # for a web port socket (we'll use this first)
}
# configuration of the server
{% extends "core.j2" %}
{% block location %}
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
location /static/ {
alias {{ item.static_root }}/; # Project's static files
}
location / {
proxy_pass http://etebase;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
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;
}
{% endblock %}
}