Discover Centmin Mod today
Register Now

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 Premium Member Premium Member

    30
    16
    8
    Jul 29, 2019
    USA
    Ratings:
    +22
    Local Time:
    9:22 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

    41,350
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    11:22 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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 Premium Member Premium Member

    30
    16
    8
    Jul 29, 2019
    USA
    Ratings:
    +22
    Local Time:
    9:22 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

    113
    32
    28
    Jul 22, 2017
    Ratings:
    +85
    Local Time:
    3:22 PM
    Remove the lines
    Code:
    127.0.0.1 MYDOMAIN.com MYDOMAIN
    ::1 MYDOMAIN.com MYDOMAIN
    
    from the file and try again. ;-)
     
    • Like Like x 1
  5. Rake-GH

    Rake-GH Premium Member Premium Member

    30
    16
    8
    Jul 29, 2019
    USA
    Ratings:
    +22
    Local Time:
    9:22 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

    41,350
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    11:22 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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
     
    • Like Like x 1
  7. Rake-GH

    Rake-GH Premium Member Premium Member

    30
    16
    8
    Jul 29, 2019
    USA
    Ratings:
    +22
    Local Time:
    9:22 AM
    default
    default
    Thanks for your help!