aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/proxy_params4
-rw-r--r--meta-webserver/recipes-httpd/nginx/nginx.inc3
2 files changed, 7 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/files/proxy_params b/meta-webserver/recipes-httpd/nginx/files/proxy_params
new file mode 100644
index 0000000000..df75bc5d74
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/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;
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc
index 522942504b..29e7efc14d 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -17,6 +17,7 @@ SRC_URI = " \
file://0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch \
file://nginx.conf \
file://default_server.site \
+ file://proxy_params \
file://nginx.init \
file://nginx-volatile.conf \
file://nginx.service \
@@ -111,6 +112,8 @@ do_install () {
install -d ${D}${sysconfdir}/nginx/sites-enabled
ln -s ../sites-available/default_server ${D}${sysconfdir}/nginx/sites-enabled/
+ install -m 0644 ${WORKDIR}/proxy_params ${D}${sysconfdir}/nginx/proxy_params
+
install -d ${D}${sysconfdir}/default/volatiles
install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx
sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx