<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Эм... протупил :)</div><br><div><div>13 марта 2008, в 15:32, Alex Vorona написал(а):</div><br class="Apple-interchange-newline"><blockquote type="cite">Alexander Simonov пишет:<br><blockquote type="cite">Приветствую!<br></blockquote><blockquote type="cite">У меня вот тут приключилась одна ситуевина.<br></blockquote><blockquote type="cite">Есть главный вебсервер, который обрабатывает все входящие соединения.<br></blockquote><blockquote type="cite">Далее он определяем в зависимости от виртуального хоста куда посылать<br></blockquote><blockquote type="cite">запрос дальше &nbsp;- на fastcgi php ферму,<br></blockquote><blockquote type="cite">на mogrel ферму или на отдельную машинку с еще одним nginx, на которой<br></blockquote><blockquote type="cite">пришлось разместить форуми только. <br></blockquote><blockquote type="cite">Потому как я не доверяю форумам, их постоянно ломают и все такое, то<br></blockquote><blockquote type="cite">запихнул форум в отдельный VPS.<br></blockquote><blockquote type="cite">Проблема состоит в том что мне надо в запросе к fastcgi php указать<br></blockquote><blockquote type="cite">корректный REMOTE_ADDR.<br></blockquote><blockquote type="cite">В настройках первого nginx указал <br></blockquote><blockquote type="cite">proxy_set_header &nbsp;X-Real-IP &nbsp;$remote_addr; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proxy_set_header &nbsp;X-Forwarded-For $proxy_add_x_forwarded_for;<br></blockquote><blockquote type="cite">На стороне второго прописываю<br></blockquote><blockquote type="cite">real_ip_header &nbsp;&nbsp;&nbsp;&nbsp;X-Real-IP;<br></blockquote><blockquote type="cite">в настройках как всего сервера так и локейшена обработки пхп.<br></blockquote><blockquote type="cite">Но переменная &nbsp;$remote_addr все равно возвращает IP первого<br></blockquote><blockquote type="cite">вебсервера, а не клиента. Как быть?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Заранее благодарю<br></blockquote><blockquote type="cite"><br></blockquote></blockquote></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">--</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div>Александр Симонов</div><div>Ведущий программист отдела информационных технологий и защиты информации&nbsp;</div><div>ТОВ "Днепр-Виктория"</div><div>email: <a href="mailto:a.simonov@favoritbet.com">a.simonov@favoritbet.com</a></div><div>tel: +380(67)3275337</div><div>icq: 310029609</div></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>