Welcome to Centmin Mod Community
Become a Member

Nginx Nginx config for cloudflare

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

  1. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:08 AM
    Mainline
    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:
    4:08 AM
    You can get the ips for ipv6 on their website :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,554
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:08 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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

    53,554
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:08 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  5. Peter Downey

    Peter Downey Member

    64
    24
    8
    May 28, 2014
    Ratings:
    +27
    Local Time:
    10:08 PM
    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

    53,554
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:08 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes if your VPS isn't setup for IPv6 support then you don't need IPv6 listing only need IPv4
     
  7. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:08 AM
    Mainline
    10.2
    Thanks for answering, I have it setup for other wp site and also tried using Cloudflare CDN :)