summaryrefslogtreecommitdiff
path: root/examples/nginx-site.conf
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-08-18 18:52:08 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2021-08-18 18:52:08 +0200
commit5cae00129a4b79802b97e48e9cd316b203e7d4af (patch)
treeeae7a8c5d24f6666896d27f2cabe5d64a248051d /examples/nginx-site.conf
parent92b0c8e4b7be8c26873fe5cbe3b1d67703c2e7c5 (diff)
add caching nginx example configuration
Diffstat (limited to 'examples/nginx-site.conf')
-rw-r--r--examples/nginx-site.conf32
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/nginx-site.conf b/examples/nginx-site.conf
new file mode 100644
index 0000000..1aac763
--- /dev/null
+++ b/examples/nginx-site.conf
@@ -0,0 +1,32 @@
+upstream dbf {
+ server 127.0.0.1:8092;
+}
+
+server {
+ listen [::]:443;
+ listen 0.0.0.0:443;
+
+ server_name FIXME;
+ access_log /var/log/nginx/FIXME.log anonip;
+
+ add_header Strict-Transport-Security "max-age=31536000" always;
+
+ location /static {
+ expires 1y;
+ root /srv/www/dbf/public;
+ }
+
+ location / {
+ proxy_cache dbf_cache;
+ proxy_cache_lock on;
+ proxy_ignore_headers "Set-Cookie";
+ proxy_hide_header "Set-Cookie";
+ proxy_pass http://dbf;
+ proxy_http_version 1.1;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto "http";
+ add_header X-Frame-Options "";
+ add_header Strict-Transport-Security "max-age=31536000" always;
+ }
+}