V
V
vaservaser2019-07-12 12:04:57
Nginx
vaservaser, 2019-07-12 12:04:57

How to resolve the "Invalid Host header" error?

Hello!
I have a server with Nginx, the frontend and backend via NestJs (Vue.js, MongoDB) are installed on the same server. Everything is working.
But when I add a line to the Nginx config, then an error appears when opening the site. How to fix it?
proxy_set_header Host $host;
Invalid Host header

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
smmaxim, 2020-04-07
@smmaxim

You apparently run http through nodejs, you need to set --host 0.0.0.0 in the nodejs server configs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question