Welcome! Log In Create A New Profile

Advanced

nginx за nginx

March 26, 2013 11:28AM
Добрый день. Нужно сделать связку:
Nginx + nginx + apache
В первом nginx сделал proxy_pass http://ip:80 , сайт работает.
Проблема заключается в том что второй nginx видит не мой IP , а IP первого сервера , но апач видит уже мой IP в X-Forwarded-For и X-Real-IP

Конфиг на первом nginx:

location /
{
proxy_pass http://ip:80/;
proxy_redirect off;

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

Конфиг на втором сервере такой же , кроме ip
Subject Author Posted

nginx за nginx

baltazor March 26, 2013 11:28AM

Re: nginx за nginx

barut March 26, 2013 11:34AM

Re: nginx за nginx

baltazor March 26, 2013 11:45AM

Re: nginx за nginx

Валентин Бартенев March 26, 2013 12:08PM

Re: nginx за nginx

sofiamay March 26, 2013 12:00PM

Re: nginx за nginx

baltazor March 26, 2013 02:50PM

Re[2]: nginx за nginx

sofiamay March 26, 2013 05:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready