summaryrefslogtreecommitdiff
path: root/examples/nginx/travelynx.conf
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-08-19 19:53:56 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-08-19 19:53:56 +0200
commit8d8498b244818c86cd8a9dcf78f625f37779e0ab (patch)
tree3f3bd55b867a754de1ec4cfe1a1ecb47b6159ac4 /examples/nginx/travelynx.conf
parent47b957361e84c826bfee0fa4e45db9de9e5c0182 (diff)
add nginx example config
Diffstat (limited to 'examples/nginx/travelynx.conf')
-rw-r--r--examples/nginx/travelynx.conf40
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/nginx/travelynx.conf b/examples/nginx/travelynx.conf
new file mode 100644
index 0000000..da8426e
--- /dev/null
+++ b/examples/nginx/travelynx.conf
@@ -0,0 +1,40 @@
+upstream travelynx {
+ server 127.0.0.1:8093;
+}
+
+server {
+ listen [::]:80;
+ listen 0.0.0.0:80;
+
+ server_name travelynx.de;
+ access_log /var/log/nginx/de.travelynx.log anonip;
+
+ rewrite ^/(.*)$ https://travelynx.de/$1 permanent;
+}
+
+
+server {
+ listen [::]:443;
+ listen 0.0.0.0:443;
+
+ server_name travelynx.de;
+ access_log /var/log/nginx/de.travelynx.log anonip;
+
+ location /static {
+ expires 1y;
+ root /srv/www/travelynx/public;
+ }
+
+ location /service-worker.js {
+ expires 1d;
+ root /srv/www/travelynx/public;
+ }
+
+ location / {
+ proxy_pass http://travelynx;
+ 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";
+ }
+}