6
6
655362016-05-06 11:53:16
Nginx
65536, 2016-05-06 11:53:16

How to pass custom header from nginx to apache?

Not an expert. Banned on google. Therefore, I ask
Nginx stands in front of Apache. There, the program made api for the Yandex market. The market sends the Authorization header, you need to spend it in Apache if it came to nginx.
Now so

location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_connect_timeout 120;
    proxy_send_timeout 120;
    proxy_read_timeout 180;
  }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Romanenko, 2016-05-06
@slimus

Have you tried this: nginx.org/en/docs/http/ngx_http_core_module.html#v... ?

6
65536, 2016-05-06
@65536

парни, вопрос снят, я сам натупил. ожидал их увидеть в сервер[хттп_*], уже забыл как это руками делать.
просто сбило с толку что до этого все работало, а они там что-то поменяли и перестало

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question