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

Xenforo 2 Unfurling Error for local domain only

Discussion in 'Forum software usage' started by Rake-GH, Sep 2, 2019.

  1. Rake-GH

    Rake-GH Active Member

    179
    93
    28
    Jul 29, 2019
    USA
    Ratings:
    +144
    Local Time:
    10:24 AM
    default
    default
    When using the "Test URL Unfurling" tool I get:

    "Could not fetch metadata from URL with error: The URL is not requestable (local: 127.0.0.1)"

    This only occurs with my own URLs, it works fine on external URLS. External sites, such as this one, can unfurl my URLs. But I cannot unfurl my own.

    I recently switched to nginx and centminmod, 99% of everything else is working fine.


    The conf is setup correctly for Xenforo 2 friendly URLs.

    Any ideas? Thanks in advance.
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,248
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    12:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    how did you setup local domain ? did you setup /etc/hosts with your local domain pointing to your server IP to bypass DNS resolvers ?
     
  3. Rake-GH

    Rake-GH Active Member

    179
    93
    28
    Jul 29, 2019
    USA
    Ratings:
    +144
    Local Time:
    10:24 AM
    default
    default
    I'm still pretty new to running my own VPS so forgive my ignorance.

    I configured my site using the guides you've posted and didn't do too much customization, I basically followed the guide. I did 3-4 test runs of migrating the site, so I have about 4 weeks experience working with CMM. I am behind Cloudflare and LetsEncrypt is between my server and Cloudflare. Cloudflare authenticated origin pulls are enabled.

    I removed my PTR record on Digital Ocean to stop it resolving the domain name from the IP. But Cloudflare does my DNS.

    my hosts file:

    Code:
    
    127.0.0.1 MYDOMAIN.com MYDOMAIN
    127.0.0.1 localhost.localdomain localhost
    127.0.0.1 localhost4.localdomain4 localhost4
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 MYDOMAIN.com MYDOMAIN
    ::1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    
    
    Thank you for your support.
     
  4. wmtech

    wmtech Active Member

    175
    44
    28
    Jul 22, 2017
    Ratings:
    +132
    Local Time:
    4:24 PM
    Remove the lines
    Code:
    127.0.0.1 MYDOMAIN.com MYDOMAIN
    ::1 MYDOMAIN.com MYDOMAIN
    
    from the file and try again. ;-)
     
  5. Rake-GH

    Rake-GH Active Member

    179
    93
    28
    Jul 29, 2019
    USA
    Ratings:
    +144
    Local Time:
    10:24 AM
    default
    default
    omg I could kiss you right now! Problem solved. as I am still kinda new to this, are there any possible negative consequences to having done this?

    also did I screw this up or is it default like that? My hosting account was suspended so I had to do an insanely rushed server migration and maybe I screwed it up
     
  6. eva2000

    eva2000 Administrator Staff Member

    55,248
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    12:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    only affects local server's DNS resolution for the domain as you told it your domain directs to 127.0.0.1 so removing those lines should fix it
     
  7. Rake-GH

    Rake-GH Active Member

    179
    93
    28
    Jul 29, 2019
    USA
    Ratings:
    +144
    Local Time:
    10:24 AM
    default
    default
    Thanks for your help!