Join the community today
Become a Member

Xenforo Was testing xenforo on a server via IP, switched to domain (via Cloudflare DNS), causing problems

Discussion in 'Forum software usage' started by atgm, Apr 15, 2017.

  1. atgm

    atgm New Member

    3
    1
    3
    Apr 15, 2017
    Ratings:
    +1
    Local Time:
    6:51 AM
    1.11.13
    10.0.30
    I originally tested everything via IP rather than domain, since the domain was being used for a temporary forum at the time. Everything worked perfectly and I thought we were ready to switch. Since our domain is managed by Cloudflare DNS, I just switched the IP from the old server to the new and thought we were ready to go.

    Accessing via domain name breaks several things:

    1. Login sometimes does not work
    2. Several CSS styles are missing (notably extras.css) or broken (forum fonts are smaller and do not match what they should be in the settings)
    3. Trying to log in as admin always boots me back to the admin login screen

    Whereas, logging in via IP allows me to use the forums normally, access the admin panel, etc. I did that to change the forum addresses (options, board information).

    Any ideas? Running centminmod 123.09beta01 with nginx config:

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name mydomain.com;
    #            return 301 $scheme://mydomain.com$request_uri;
    #       }
    
    server {
      server_name mydomain.com www.mydomain.com *.mydomain.com IP LOADBALANCERIP;
      #server_name _;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/mydomain.com/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/mydomain.com/log/error.log;
    
      root /home/nginx/domains/mydomain.com/public;
      ssi on;
    
      location / {
    
    # block common exploits, sql injections etc
      #include /usr/local/nginx/conf/block.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # Shows file listing times as local time
      #autoindex_localtime on;
    
      # Enable for vBulletin usage WITHOUT vbSEO installed
      # More example Nginx vhost configurations at
      # http://centminmod.com/nginx_configure.html
      #try_files    $uri $uri/ /index.php;
      #
        ssi on;
    
      }
    
      location /forums/ {
        index index.php index.html index.htm;
        try_files $uri $uri/ /forums/index.php?$uri&$args;
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    
    There was nothing useful in the error log, but xenforo produced some very puzzling PHP errors:

    Code:
    Undefined index: language_id14 minutes ago - library/XenForo/Visitor.php:517
    Undefined index: properties14 minutes ago - library/XenForo/Dependencies/Public.php:303
    Argument 2 passed to XenForo_Application::mapMerge() must be of the type array, boolean given, called in /home/nginx/domains/mydomain.com/public/forums/library/XenForo/Dependencies/Public.php on line 304 and defined14 minutes ago - library/XenForo/Application.php:1174
    Undefined index: language_id14 minutes ago - library/XenForo/Visitor.php:517
    Undefined index: properties14 minutes ago - library/XenForo/Dependencies/Public.php:303
    Argument 2 passed to XenForo_Application::mapMerge() must be of the type array, boolean given, called in /home/nginx/domains/mydomain.com/public/forums/library/XenForo/Dependencies/Public.php on line 304 and defined14 minutes ago - library/XenForo/Application.php:1174
    Undefined index: language_id14 minutes ago - library/XenForo/Visitor.php:517
    Undefined index: decimal_point14 minutes ago - library/XenForo/Locale.php:666
    Undefined index: thousands_separator14 minutes ago - library/XenForo/Locale.php:667
    Undefined index: decimal_point14 minutes ago - library/XenForo/Locale.php:666
    Undefined index: thousands_separator14 minutes ago - library/XenForo/Locale.php:667
    
    Is this some kind of caching issue? I've already tried restarting memcache, rebooting...
     
  2. atgm

    atgm New Member

    3
    1
    3
    Apr 15, 2017
    Ratings:
    +1
    Local Time:
    6:51 AM
    1.11.13
    10.0.30
    I've tested it on some other domains and DNS providers and it seems to be a CF issue, nothing related to CentMinMod at all. :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,605
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    7:51 AM
    Nginx 1.13.x
    MariaDB 5.5