This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
nginx-config/sites-available/status.krautspace.de

48 lines
1.4 KiB
Text
Raw Normal View History

2016-05-21 13:47:21 +02:00
server {
listen 0.0.0.0:80;
2016-07-15 21:29:24 +02:00
listen 0.0.0.0:443 ssl http2;
2016-05-21 13:47:21 +02:00
listen [2a01:4f8:151:51a3:176:9:184:3]:80;
2016-07-15 21:29:24 +02:00
listen [2a01:4f8:151:51a3:176:9:184:3]:443 ssl http2;
2016-05-21 13:47:21 +02:00
ssl_certificate /etc/ssl/private/star.krautspace.de.combined.crt;
ssl_certificate_key /etc/ssl/private/star.krautspace.de.key;
server_name status.krautspace.de status.kraut.space;
access_log /var/log/nginx/status.krautspace.de_access.log ano;
error_log /var/log/nginx/status.krautspace.de_error.log;
root /var/www/status.hackspace-jena.de;
autoindex on;
# für alles das mit "/api" begint /api ausliefern und paar Heder setzen
location ^~ /api {
gzip_min_length 500; # hier mal senken damit kompremiert wird
default_type application/json;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
try_files /api =404;
}
# für png Bilder in src und images Header setzen
location ^~ /images/ {
expires 30d;
}
# für /status/button/ revers-Proxy nutzen
location /status/button/ {
keepalive_timeout 0;
chunked_transfer_encoding off;
# leite Anfrage an router.krautspace.de (ro01) weiter
proxy_pass http://ro01/status/;
proxy_connect_timeout 10s;
proxy_cache_valid 200 15s;
proxy_cache_valid any 5s;
proxy_cache statusATro01;
proxy_ignore_client_abort on; # damit Cache aktualisiert wird
}
# jede sonstige Anfrage
location / {
try_files $uri $uri/ =404;
}
}