From e1477361431967f20167d06ff06de7ae32f5655e Mon Sep 17 00:00:00 2001 From: Alex Thomassen Date: Fri, 1 Oct 2021 16:50:13 +0200 Subject: [PATCH] Add proxy_params --- .acmeenv | 2 +- proxy_params | 4 ++++ setup.sh | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 proxy_params diff --git a/.acmeenv b/.acmeenv index ec584ac..68f22c8 100644 --- a/.acmeenv +++ b/.acmeenv @@ -1,4 +1,4 @@ . "$HOME/.acme.sh/acme.sh.env" -export CF_Account_ID="" +export CF_Account_ID="422c4fb547f02ab95c920ac70a78c4bf" export CF_Token="" \ No newline at end of file diff --git a/proxy_params b/proxy_params new file mode 100644 index 0000000..366cc8b --- /dev/null +++ b/proxy_params @@ -0,0 +1,4 @@ +proxy_set_header Host $http_host; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +proxy_set_header X-Forwarded-Proto $scheme; \ No newline at end of file diff --git a/setup.sh b/setup.sh index 207f2e7..afee99c 100644 --- a/setup.sh +++ b/setup.sh @@ -30,6 +30,9 @@ curl -L "$GIST/letsencrypt.conf" > "$NGINX/letsencrypt.conf" # Get the base SSL configuration curl -L "$GIST/ssl_params.conf" > "$NGINX/ssl_params.conf" +# Get the base reverse proxy configuration +curl -L "$GIST/proxy_params" > "$NGINX/proxy_params" + # Get the PHP 7.4 FPM configuration (not enabled by default) # You also need to install PHP before enabling it. curl -L "$GIST/phpfpm.conf" > "$NGINX/phpfpm.conf"