Hey all,
I am not to NGINX and this forum, after many years being a apache user, I have multiple application running behind tomcat, once application seems to give us issues. when user edits a form and clicks, seems that the JSON file that is returned to proxy is not processing correctly. I have reported to the vendor for investigation however in NGINX when I play around the config i keep getting different results.
I have attached the config and snapshot of the error - thanks in advance.
OS: REDHAT 8
NGINX (/etc/nginix/nginx.conf )
user nginx;
worker_processes auto;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 4000;
use epoll;
multi_accept on;
}
http {
server_tokens off;
log_format custom '$http_x_forwarded_for - $remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
' $request_id ';
include /etc/nginx/conf.d/*.conf;
}
(App.conf)
upstream kyc {
hash $http_x_forwarded_for consistent;
server xxxxxx:8080;
server xxxxxx:8080;
}
server {
listen 443 ssl;
# Domain name:
server_name kyc.com;
# SSL
ssl_certificate /etc/nginx/certs/apps.crt;
ssl_certificate_key /etc/nginx/certs/apps.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
proxy_ssl_verify off;
# FrontEnd
location / {
proxy_redirect off;
proxy_pass http://kyc/;
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Logging:
access_log /var/log/nginx/kyc.access.log custom;
error_log /var/log/nginx/kyc.error.log;
gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
gzip on;
}