You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

54 lines
1.4 KiB

# This configuration works with the S2I image defined in https://github.com/BCDevOps/s2i-nginx
# Allows non-standard headers like SMGOV_USERGUID
ignore_invalid_headers off;
server {
listen 8080;
server_name _;
# default path
location / {
proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on;
# remove directories from incoming requests;
rewrite ^/divorce-dev$ / last;
rewrite ^/divorce-test$ / last;
rewrite ^/divorce$ / last;
rewrite ^/divorce-dev(.*)$ $1 last;
rewrite ^/divorce-test(.*)$ $1 last;
rewrite ^/divorce(.*)$ $1 last;
}
# static no rewrite (dev)
location /divorce-dev/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on;
}
# static no rewrite (test)
location /divorce-test/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on;
}
# static no rewrite (prod)
location /divorce/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on;
}
# For status of ngnix service
location /nginx_status {
# Enable Nginx stats
stub_status on;
# No need to log this request, its just noise
access_log off;
}
}