How to fix nginx throws 400 bad request and invalid number of arguments in proxy_set_header

since i added my domain to the server, i have been receiving this error anytime i want to access the my site on a browser with my domain name, it always renders 400 bad request. i decided to check ngnix error.log, i saw invalid number of arguments in proxy_set_header… please how can i fix this error?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @metalcode03,

It seems you have an error with your configuration file. Unless you show it to us, we won’t be able to help you out.

Having said that, you can check this article on how to configure Server Blocks(Vhost configuration files) on Nginx and maybe you’ll be able to determine the root of the problem in your case -

Regards, KDSys