From 00735c402b8b153c9851f9f1600973d3a365d440 Mon Sep 17 00:00:00 2001 From: xithical <86810816+xithical@users.noreply.github.com> Date: Thu, 9 Dec 2021 21:57:52 -0600 Subject: [PATCH] Add initial example config for nginx --- config_examples/nginx.conf.example | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 config_examples/nginx.conf.example diff --git a/config_examples/nginx.conf.example b/config_examples/nginx.conf.example new file mode 100644 index 00000000..d8da08b7 --- /dev/null +++ b/config_examples/nginx.conf.example @@ -0,0 +1,37 @@ +# Config based on https://gitlab.com/lewishill211/crafty-controller-https +# Edits for 4.0 compatibility by pretzelDewey - https://gitlab.com/amcmanu3 + +upstream crafty { + server ""; +} + +server { + listen 80 default_server; + rewrite ^(.*) https://$host$1 permanent; +} + +server { + listen 443 ssl; + server_name ; + ssl_certificate ; + ssl_certificate_key ; + location / { + proxy_http_version 1.1; + proxy_redirect off; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host + + proxy_pass https://localhost:8443; + + proxy_buffering off; + client_max_body_size 0; + proxy_connect_timeout 3600s; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + send_timeout 3600s; + } +}