Welcome! Log In Create A New Profile

Advanced

## NGINX - Proxy issues

Posted by Maas 
## NGINX - Proxy issues
June 17, 2023 06:12AM
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;
}
Attachments:
open | download - error.png (49.3 KB)
Re: ## NGINX - Proxy issues
June 17, 2023 06:15AM
Just to add:
NGINX version: 1.14.1
Re: ## NGINX - Proxy issues
June 19, 2023 12:47PM
Any help guys :)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 149
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready