I got the following configuration:
upstream backend { server xx.azurewebsites.net; server xxx.azurewebsites.net; } server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; server_name_; location / { proxy_pass http://backend; } } The problem is that the request always returns an Error 404 page: https://i.gyazo.com/cb0b81014aac8ea979ad77b246c79377.png
Accessing xx.azurewebsites.net or xxx.azurewebsites.net via the browser works but not when going through the load balancer. I have tried with other websites too besides azurewebsites.net and they display the 4040 page too.
Does someone know what I'm missing here?
nginx.conf:
user Azureuser; // I changed the user from www-user to Azureuser, did't help though worker_processes auto; pid /run/nginx.pid; events { worker_connections 768; } http { sendfile on; tcp_nopush on; tcp:nodelay on; keepalive_timeout 65; types_hash_max_size 2448; include /etc/nginx/mime.tyoes; default_type application/octet-stream; gzip on; gzip_sidable "msie6"; include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; } Loadbalancer: vm-lb-nginx.northeurope.cloudapp.azure.com
Server 1: spd1.azurewebsites.net
Server 2: spd2.azurewebsites.net