[solved] backend server nginx down HAProxy
-
@PiBa can you explain to me, why the backen only focused up after using the setting "HTTP / 1.1 \ r \ nHost: \ nextcloud.projectus.com.br"?
-
@wesleylc1
Can you tell me why your nginx configuration requires the host header to be send in requests? -
@PiBa I really don't know why ngix requires the header to be sent on requests; I followed an Internet totorial to deploy "nextcloud" using nginx. Can you open the link to try to help me understand?
How to Install NextCloud on Ubuntu 18.04 with Nginx (LEMP Stack)
-
@PiBa Hi man, these were the answers I found about your question.
In order to figure out which virtual host to use, I think
This causes you to go to the default_server host_server
-
@wesleylc1
Then it seems you have answered your question why the host header must be send in checks. HAProxy's health-checks by default do not send this header and your nginx configuration needs it to find the correct virtual host with the server_name configuration. The 'default virtual host' likely returns the 400 response status. Its nice to know that doing some research and actually understanding how things work you can succeed with fishing without needing other people to give you the fish, that will definitely help with future diagnosing of issues.