Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown directive "proxy_set_header" #24

Closed
xenophy opened this issue Jan 30, 2012 · 2 comments
Closed

unknown directive "proxy_set_header" #24

xenophy opened this issue Jan 30, 2012 · 2 comments

Comments

@xenophy
Copy link

xenophy commented Jan 30, 2012

I operate Nginx as reverse proxy and, for the server of the backend, want to transfer header information.

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

However, an error occurs as follows.

nginx: [emerg] unknown directive "proxy_set_header" in /usr/local/nginx/conf/nginx.conf:XXX

The contents which I set are as follows.

server {
  server_name _;

  listen 443;
  ssl on;
  ssl_certificate      /crtpath;
  ssl_certificate_key  /keypath;

  tcp_nodelay on;
  proxy_pass websockets;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Is not the transfer of the header possible?

@yaoweibin
Copy link
Owner

At present, It does not support this feature.

On 2012-1-31 4:49, Kazuhiro Kotsutsumi wrote:

I operate Nginx as reverse proxy and, for the server of the backend, want to transfer header information.

 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header Host $host;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

However, an error occurs as follows.

 nginx: [emerg] unknown directive "proxy_set_header" in /usr/local/nginx/conf/nginx.conf:XXX

The contents which I set are as follows.

 server {
   server_name _;

   listen 443;
   ssl on;
   ssl_certificate      /crtpath;
   ssl_certificate_key  /keypath;

   tcp_nodelay on;
   proxy_pass websockets;
   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 }

Is not the transfer of the header possible?


Reply to this email directly or view it on GitHub:
#24

Weibin Yao

@xenophy
Copy link
Author

xenophy commented Feb 1, 2012

I understood it.
I am glad when the function is implemented.

@xenophy xenophy closed this as completed Feb 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants