I am new to NGINX and trying to setup a simple load balancer for HTTPS application traffic.
My health checks are failing and the VIP is showing a 502 error when loading the page.
My current config file:
upstream app-backend {
server app.website.com:443;
server app2.website.com:443;
zone app-backend 64k;
}
server {
listen x.x.x.x:443 ssl;
ssl_certificate /etc/nginx/ssl/website.com/server.crt;
ssl_certificate_key /etc/nginx/ssl/website.com/server.key;
location / {
proxy_pass http://appp-backend;
health_check interval=10 fails=3 passes=2;
}
}
When going to my Dashboard and refreshing the page, I notice the SSL handshake failing with every refresh to https://x.x.x.x.website.com
my nginx.conf file:
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}