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: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready