Skip to content

Commit

Permalink
Services: nginx conf update.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Aug 16, 2023
1 parent ceafd1a commit 736bddf
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 72 deletions.
53 changes: 22 additions & 31 deletions services/nginx/config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,11 @@ http {
#server {
# listen 5601;
# server_name kibana.local;
# ssl_certificate /etc/nginx/es_certificates/elastic-stack-ca.crt.pem;
# ssl_certificate_key /etc/nginx/es_certificates/elastic-stack-ca.key.pem;

#
# proxy_ssl_certificate /etc/nginx/es_certificates/elasticsearch/elasticsearch/elasticsearch-1/elasticsearch-1.crt;
# proxy_ssl_certificate_key /etc/nginx/es_certificates/elasticsearch/elasticsearch/elasticsearch-1/elasticsearch-1.pem;

# proxy_ssl_trusted_certificate /etc/nginx/es_certificates/elasticsearch/elasticsearch/elasticsearch-1/elasticsearch-1.crt;
# proxy_ssl_server_name on;

# location / {
# proxy_pass http://kibana;
#
# proxy_set_header X-ProxyScheme https;
# proxy_set_header X-ProxyScheme http;
# proxy_set_header X-ProxyHost nginx.docker.localhost;
# proxy_set_header X-ProxyPort 5601;
# proxy_set_header X-ProxyContextPath /;
Expand All @@ -81,7 +72,7 @@ http {
# listen 80;
# listen [::]:80;
# server_name nginx.local;
# return 301 https://hostrequest_uri;
# return 301 https://$host$request_uri;
#}


Expand All @@ -100,10 +91,10 @@ http {
location / {
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost host;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath /;
proxy_set_header X-Forwarded-Context /;
proxy_pass https://nifi;
Expand All @@ -112,44 +103,44 @@ http {
location ^~ /nifi {
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost host;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-Forwarded-Context /nifi;
proxy_set_header X-ProxyContextPath /nifi;
proxy_pass https://nifi;
}

location ^~ /nifi-api/ {
proxy_set_header Host NIFI;
proxy_set_header X-Real-IP NIFI;
proxy_set_header X-ProxyHost NIFI;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/nifi-api/;
}

location ^~ /nifi-content-viewer/ {
proxy_set_header Host NIFI;
proxy_set_header X-Real-IP NIFI;
proxy_set_header X-ProxyHost host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/nifi-content-viewer/;
}

location ^~ /nifi-registry-api/ {
proxy_set_header Host NIFI;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost host;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/nifi-registry-api/;
}
Expand Down
82 changes: 41 additions & 41 deletions services/nginx/config/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ http {
# listen 80;
# listen [::]:80;
# server_name nginx.local;
# return 301 https://${DOLLAR}host${DOLLAR}request_uri;
# return 301 https://$host$request_uri;
#}


Expand All @@ -99,91 +99,91 @@ http {
proxy_ssl_server_name on;

location / {
proxy_set_header Host ${DOLLAR}host;
proxy_set_header X-Real-IP ${DOLLER}remote_addr;
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme ${DOLLAR}scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath /;
proxy_set_header X-Forwarded-Context /;
proxy_pass https://nifi;
}

location ^~ /nifi {
proxy_set_header Host ${DOLLAR}host;
proxy_set_header X-Real-IP ${DOLLER}remote_addr;
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme ${DOLLAR}scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-Forwarded-Context /nifi;
proxy_set_header X-ProxyContextPath /nifi;
proxy_pass https://nifi;
}

location ^~ /nifi-api/ {
proxy_set_header Host ${DOLLAR}host;
proxy_set_header X-Real-IP ${DOLLER}remote_addr;
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme ${DOLLAR}scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/nifi-api/;
}

location ^~ /nifi-content-viewer/ {
proxy_set_header Host ${DOLLAR}host;
proxy_set_header X-Real-IP ${DOLLER}remote_addr;
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme ${DOLLAR}scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/nifi-content-viewer/;
}

location ^~ /nifi-registry-api/ {
proxy_set_header Host ${DOLLAR}host;
proxy_set_header X-Real-IP ${DOLLER}remote_addr;
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme ${DOLLAR}scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/nifi-registry-api/;
}

location ^~ /tenants {
proxy_set_header Host ${DOLLAR}host;
proxy_set_header X-Real-IP ${DOLLER}remote_addr;
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme ${DOLLAR}scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/tenants/;
}

location ^~ /controller {
proxy_set_header Host ${DOLLAR}host;
proxy_set_header X-Real-IP ${DOLLER}remote_addr;
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme ${DOLLAR}scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/controller/;
}

location ^~ /policies {
proxy_set_header Host ${DOLLAR}host;
proxy_set_header X-Real-IP ${DOLLER}remote_addr;
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host;
proxy_set_header Host nifi;
proxy_set_header X-Real-IP nifi;
proxy_set_header X-ProxyHost $host;
proxy_set_header X-ProxyPort 8443;
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme ${DOLLAR}scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-ProxyScheme $scheme;
proxy_set_header X-ProxyContextPath "";
proxy_pass https://nifi/policies/;
}
Expand Down

0 comments on commit 736bddf

Please sign in to comment.