Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Language specific forums Russian (Русский) Общие вопросы
  • Search

VESTACP и Cloudflare настройка

Общие вопросы о панели управления Vesta
Post Reply
  • Print view
Advanced search
11 posts
  • 1
  • 2
  • Next
ars
Posts: 93
Joined: Sun Mar 22, 2015 11:51 pm
Contact:
Contact ars
Website

VESTACP и Cloudflare настройка
  • Quote

Post by ars » Mon Nov 14, 2016 8:58 pm

Я пользуюсь и в логах не вижу реальные адреса посетителей
Знаю, на форуме не раз поднимались разные проблемы с Cloudflare, но не нашел корректного руководства по настройке nginx для VestaCP, чтоб корректно отображалось IP адреса
Top

ars
Posts: 93
Joined: Sun Mar 22, 2015 11:51 pm
Contact:
Contact ars
Website

Re: VESTACP и Cloudflare настройка
  • Quote

Post by ars » Tue Nov 15, 2016 2:51 pm

any help ?
Top

http
Posts: 142
Joined: Tue Feb 23, 2016 3:43 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: VESTACP и Cloudflare настройка
  • Quote

Post by http » Tue Nov 15, 2016 6:48 pm

если не ошибаюсь это можно в cloudflare настроить
Top

ars
Posts: 93
Joined: Sun Mar 22, 2015 11:51 pm
Contact:
Contact ars
Website

Re: VESTACP и Cloudflare настройка
  • Quote

Post by ars » Tue Nov 15, 2016 7:00 pm

По моему на сервере нужно, чтоб потом для каждого домена не делать
Top

Stesh
Posts: 348
Joined: Mon Nov 09, 2015 5:52 pm

Os: CentOS 6x
Web: nginx + php-fpm
Re: VESTACP и Cloudflare настройка
  • Quote

Post by Stesh » Tue Nov 15, 2016 8:27 pm

В основной конфиг nginx, до инклудов других файлов (т.е. перед # Wildcard include) добавить

Code: Select all

set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 199.27.128.0/21;
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2c0f:f248::/32;
set_real_ip_from 2a06:98c0::/29;

# use any of the following two
real_ip_header CF-Connecting-IP;
#real_ip_header X-Forwarded-For;
ip уточнить здесь https://www.cloudflare.com/ips/

Затем nginx -t (проверяем конфиг). Если все ок, то service nginx restart
Top

ars
Posts: 93
Joined: Sun Mar 22, 2015 11:51 pm
Contact:
Contact ars
Website

Re: VESTACP и Cloudflare настройка
  • Quote

Post by ars » Tue Nov 15, 2016 8:32 pm

Спасибо!
То есть других нгниксовских модулей не надо подгружать :)
Top

ars
Posts: 93
Joined: Sun Mar 22, 2015 11:51 pm
Contact:
Contact ars
Website

Re: VESTACP и Cloudflare настройка
  • Quote

Post by ars » Tue Nov 15, 2016 8:54 pm

Не берет :(

# nginx -t
nginx: [emerg] invalid number of arguments in "set_real_ip_from" directive in /etc/nginx/nginx.conf:125
nginx: configuration file /etc/nginx/nginx.conf test failed
Top

Stesh
Posts: 348
Joined: Mon Nov 09, 2015 5:52 pm

Os: CentOS 6x
Web: nginx + php-fpm
Re: VESTACP и Cloudflare настройка
  • Quote

Post by Stesh » Tue Nov 15, 2016 10:03 pm

ars wrote:Не берет :(

# nginx -t
nginx: [emerg] invalid number of arguments in "set_real_ip_from" directive in /etc/nginx/nginx.conf:125
nginx: configuration file /etc/nginx/nginx.conf test failed
Что в строках 123-127?
Top

ars
Posts: 93
Joined: Sun Mar 22, 2015 11:51 pm
Contact:
Contact ars
Website

Re: VESTACP и Cloudflare настройка
  • Quote

Post by ars » Tue Nov 15, 2016 11:03 pm

Ничего:



set_real_ip_from 103.21.244.0/22
set_real_ip_from 103.22.200.0/22
set_real_ip_from 103.31.4.0/22
set_real_ip_from 104.16.0.0/12
set_real_ip_from 108.162.192.0/18
set_real_ip_from 131.0.72.0/22
set_real_ip_from 141.101.64.0/18
set_real_ip_from 162.158.0.0/15
set_real_ip_from 172.64.0.0/13
set_real_ip_from 173.245.48.0/20
set_real_ip_from 188.114.96.0/20
set_real_ip_from 190.93.240.0/20
set_real_ip_from 197.234.240.0/22
set_real_ip_from 198.41.128.0/17
set_real_ip_from 199.27.128.0/21
set_real_ip_from 2400:cb00::/32
set_real_ip_from 2405:8100::/32
set_real_ip_from 2405:b500::/32
set_real_ip_from 2606:4700::/32
set_real_ip_from 2803:f800::/32
set_real_ip_from 2c0f:f248::/32
set_real_ip_from 2a06:98c0::/29
123
# use any of the following two
real_ip_header CF-Connecting-IP;
#real_ip_header X-Forwarded-For;
127
Top

ars
Posts: 93
Joined: Sun Mar 22, 2015 11:51 pm
Contact:
Contact ars
Website

Re: VESTACP и Cloudflare настройка
  • Quote

Post by ars » Tue Nov 15, 2016 11:09 pm

Нашел , не хватали ";" :)
Спасибо !
Top


Post Reply
  • Print view

11 posts
  • 1
  • 2
  • Next

Return to “Общие вопросы”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password