Update nginx.conf
try different nginx config
This commit is contained in:
@@ -19,6 +19,14 @@ http {
|
|||||||
server notenextra-cse:4200;
|
server notenextra-cse:4200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Decide where to send /_pagefind* based on the page that made the request
|
||||||
|
map $http_referer $pagefind_upstream {
|
||||||
|
default http://notenextra-cse;
|
||||||
|
~*://[^/]+/Math(?:/|$) http://notenextra-math;
|
||||||
|
~*://[^/]+/CSE(?:/|$) http://notenextra-cse;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
|
|
||||||
# add extra types
|
# add extra types
|
||||||
@@ -48,6 +56,16 @@ http {
|
|||||||
access_log off;
|
access_log off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Send all Pagefind assets (/_pagefind.js and /_pagefind/*) to the chosen app
|
||||||
|
# ^~ /_pagefind matches both "/_pagefind.js" and "/_pagefind/..."
|
||||||
|
location ^~ /_pagefind {
|
||||||
|
proxy_pass $pagefind_upstream; # leaves URI intact (/_pagefind.js, /_pagefind/manifest.json, etc.)
|
||||||
|
proxy_set_header Host $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;
|
||||||
|
}
|
||||||
|
|
||||||
location ~ ^/(build|tests|config|lib|3rdparty|templates|data)/ {
|
location ~ ^/(build|tests|config|lib|3rdparty|templates|data)/ {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user