36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name ~^agenda.* ~^agendas.*;
|
|
|
|
access_log /var/log/nginx/chrono-access.log combined_full;
|
|
error_log /var/log/nginx/chrono-error.log;
|
|
|
|
location ~ ^/static/(.+)$ {
|
|
root /;
|
|
try_files /var/lib/chrono/tenants/$host/static/$1
|
|
/var/lib/chrono/tenants/$host/theme/static/$1
|
|
/var/lib/chrono/collectstatic/$1
|
|
=404;
|
|
}
|
|
|
|
location ~ ^/media/(.+)$ {
|
|
alias /var/lib/chrono/tenants/$host/media/$1;
|
|
}
|
|
|
|
location /robots.txt {
|
|
alias /var/lib/chrono/www/robots.txt;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://unix:/var/run/chrono/chrono.sock;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-SSL on;
|
|
proxy_set_header X-Forwarded-Protocol ssl;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
}
|
|
}
|