mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
nginx: add default proxy_params
As per Debian packaging - to use it, see
https://wiki.debian.org/Nginx/DirectoryStructure#Extra_Parameters
This file is most commonly included when Nginx is acting
as a reverse proxy:
include /etc/nginx/proxy_params;
proxy_pass http://localhost:8000;
Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
22e17bb10c
commit
eaedfa5e0e
4
meta-webserver/recipes-httpd/nginx/files/proxy_params
Normal file
4
meta-webserver/recipes-httpd/nginx/files/proxy_params
Normal file
|
|
@ -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;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user