Want to subscribe to topics you're interested in?
Become a Member

Using Cloudflare & Ezoic with CentminMod

Discussion in 'Other Web Apps usage' started by BamaStangGuy, Sep 26, 2019.

  1. BamaStangGuy

    BamaStangGuy Active Member

    602
    178
    43
    May 25, 2014
    Ratings:
    +242
    Local Time:
    10:51 AM
    Hi,

    I am trying to setup Ezoic on my site but running into issues.

    The process goes like this: User > CloudFlare> Ezoic > My Server.

    When Ezoic is enabled it pulls up the default CentminMod page instead of my website as seen in the screenshot below.

    Here is their email to me:

    We're still having issues. It looks like your origin/host could be blocking us, can you reach out to them and have them whitelist our IPs?

    When we run your site through our servers we still get this:

    image.png

    The process goes: user > cloudflare > ezoic > origin (request now coming from ezoic ip's) > gives us this page instead of the site

    We think this could be if your host/origin is only allowing Cloudflare connections to come from Cloudflare so when it gets our IP we see the above image.

    Best,
    Alexis

    I am not blocking all requests other than CloudFlare on this server so I do not believe that is it. Is there some other issue that I should be looking into?
     
  2. eva2000

    eva2000 Administrator Staff Member

    41,726
    9,396
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,432
    Local Time:
    1:51 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    See Using the X-Forwarded-For (XFF) Header which shows you how to add X-Forwarded-For header to PHP code. But you can do it on server level just have to remove existing Cloudflare real IP configuration outlined at Nginx Cloudflare & Incapsula (reverse proxy HttpRealIpModule) - CentminMod.com LEMP Nginx web stack for CentOS as you're immediate reverse proxy in front of your Centmin Mod Nginx server is no longer Cloudflare but Ezoic which seems to be on AWS Cloud servers running with Varnish Cache. See Module ngx_http_realip_module

    and Origin Errors and Other Error Messages
     
  3. BamaStangGuy

    BamaStangGuy Active Member

    602
    178
    43
    May 25, 2014
    Ratings:
    +242
    Local Time:
    10:51 AM
    I can do that and will once we get it working but I can't see how that is the issue. The IP Address of the user should not have anything to do with what virtual host Nginx sees should it? Right now, when Ezoic is becoming between Cloudflare and my server, Nginx is serving up the default virtual host at /usr/local/nginx/html/
     
  4. BamaStangGuy

    BamaStangGuy Active Member

    602
    178
    43
    May 25, 2014
    Ratings:
    +242
    Local Time:
    10:51 AM
    I have also already added the Ezoic IP addresses to the csf allow list.
     
  5. BamaStangGuy

    BamaStangGuy Active Member

    602
    178
    43
    May 25, 2014
    Ratings:
    +242
    Local Time:
    10:51 AM
    I have setup X-Forwarded-For and disabled CloudFlare to see if this helps.
     
  6. eva2000

    eva2000 Administrator Staff Member

    41,726
    9,396
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,432
    Local Time:
    1:51 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    what is set in main hostname's /usr/local/nginx/conf/conf.d/virtual.conf Nginx vhost for server_name ? it should be different from your site's nginx vhost server_name.

    Also what is Ezoic using for Varnish Cache's backend reference to your site, an IP address or the hostname = your domain name ? As Centmin Mod's IP address access goes to main hostname's nginx i.e. /usr/local/nginx/html while hostname = your domain name backend would go to your site.
     
  7. BamaStangGuy

    BamaStangGuy Active Member

    602
    178
    43
    May 25, 2014
    Ratings:
    +242
    Local Time:
    10:51 AM
    lixxx-xxx.members.linode.com is the server_name. Will ask second question to them.
     
  8. BamaStangGuy

    BamaStangGuy Active Member

    602
    178
    43
    May 25, 2014
    Ratings:
    +242
    Local Time:
    10:51 AM
    Still have been unable to find a solution. User > CloudFlare > Server brings up the correct virtual host. User > CloudFlare > Ezoic > Server brings up /usr/local/nginx/html/
     
  9. Solidus

    Solidus New Member

    7
    4
    3
    May 17, 2016
    Ratings:
    +5
    Local Time:
    4:51 PM
    1.9
    10.1
    Are you integrating via CloudFlare or the WordPress plugin?
     
  10. BamaStangGuy

    BamaStangGuy Active Member

    602
    178
    43
    May 25, 2014
    Ratings:
    +242
    Local Time:
    10:51 AM
    Was CloudFlare but we never got it to work. The Wordpress plugin works though so we are using that now.
     
  11. eva2000

    eva2000 Administrator Staff Member

    41,726
    9,396
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,432
    Local Time:
    1:51 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    did you get an answer ?
     
  12. BamaStangGuy

    BamaStangGuy Active Member

    602
    178
    43
    May 25, 2014
    Ratings:
    +242
    Local Time:
    10:51 AM
    I asked but they never replied to that specific question.