Beginner questions about proxy configuration and white space

ynasser nginx-forum at
Thu Sep 8 14:41:34 UTC 2011


I have installed nginx on my personal computer and would like to use it
as a proxy to force authentication via modified http headers in various
browsers. There's an add-on in firefox to do this, but none for Chrome,
which is why I am using nginx. I've edited configuration file to include
something like this under the http section:

  server {
	listen some_port;

	location http://some_ip {
		add_header X-h1 h1;
		add_header X-h2 h2 h2;
		add_header X-h3 h3;
		add_header X-h4 h4; 
		add_header X-h5 h5;
		add_header X-h6 h6 h6;
		add_header X-h7 h7;

I figured that out from reading many examples and the wiki. Now, I do
not know how exactly to configure nginx to act as a proxy. I've read
through part of the wiki on the HttpProxy module, but I don't have much
experience with web servers or proxies. Could someone point me in the
right direction?

Also, when editing the configuration file using the http headers module
(this:, can values have spaces
in them? Or should I put quotations around the whole thing? I read here: that
whitespace doesn't matter, but I just thought to double check, since I
saw no examples where values had spaces in them.


Posted at Nginx Forum:,214982,214982#msg-214982

More information about the nginx mailing list