Report this

What is the reason for this report?

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

Posted on February 21, 2020
miracle ogbonna

By miracle ogbonna

software engineer

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?



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!

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.

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 - https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

Regards, KDSys

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.