Welcome to Centmin Mod Community
Register Now

Nginx Nginx config for cloudflare

Discussion in 'Centmin Mod Insights' started by RoldanLT, Jul 18, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:34 PM
    1.11
    10.2
    Following cloudflare guide here: http://centminmod.com/nginx_configure_cloudflare.html

    Results an error:


    IPV6 is not working.
     
  2. Lundz

    Lundz Member

    42
    6
    8
    May 28, 2014
    Ratings:
    +7
    Local Time:
    9:34 AM
    You can get the ips for ipv6 on their website :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,155
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    5:34 PM
    Nginx 1.13.x
    MariaDB 5.5
    Did you make sure to place it within http { context of nginx.conf ? Also I don't think you need to do the realip setup if you only use Cloudflare for DNS as these steps are only if you use Cloudflare's proxy/caching

    yeah might need to check if Cloudflare updated their ips

    but it looks right however ip addresses need updating see below

    if you'd combining both IPv4 and IPv6 it's this format with only one real_ip_header CF-Connecting-IP; instance. Should update my web site for that and the updated ip listing

     
  4. eva2000

    eva2000 Administrator Staff Member

    30,155
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    5:34 PM
    Nginx 1.13.x
    MariaDB 5.5
  5. Peter Downey

    Peter Downey Member

    62
    23
    8
    May 28, 2014
    Ratings:
    +25
    Local Time:
    3:34 AM
    The same thing happened to me last week. I just took the ipv6 codes out entirely. I figured it might be because my vps didn't have a ipv6 address.
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,155
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    5:34 PM
    Nginx 1.13.x
    MariaDB 5.5
    yes if your VPS isn't setup for IPv6 support then you don't need IPv6 listing only need IPv4
     
  7. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:34 PM
    1.11
    10.2
    Thanks for answering, I have it setup for other wp site and also tried using Cloudflare CDN :)