Welcome to Centmin Mod Community
Register Now

Xenforo Xenforo & Wordpress Vhost Setup?

Discussion in 'Forum software usage' started by upgrade81, Mar 31, 2018.

  1. upgrade81

    upgrade81 Premium Member Premium Member

    178
    9
    18
    Sep 5, 2016
    Italy
    Ratings:
    +13
    Local Time:
    4:00 PM
    1.13.8
    10
    Hello sorry I recently installed the addon to manage the Xenforo cache with Redis and everything seems to work, but a doubt arises.

    In the vhost file should I indicate to use php-redis.conf?
     
  2. eva2000

    eva2000 Administrator Staff Member

    37,235
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    1:00 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    where you getting php-redis.conf from ?
     
  3. upgrade81

    upgrade81 Premium Member Premium Member

    178
    9
    18
    Sep 5, 2016
    Italy
    Ratings:
    +13
    Local Time:
    4:00 PM
    1.13.8
    10
    the standard php-rediscahe.conf for wordpress in /usr/local/nginx/conf/
     
  4. eva2000

    eva2000 Administrator Staff Member

    37,235
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    1:00 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    oh not you need to use separate include files so leave php-rediscache.conf for wordpress location contexts and use normal php.conf include file for xenforo location contexts. You don't want to be using php-rediscache.conf for xenforo location contexts and php serving.

    using Xenforo - Updated Xenforo 2 Nginx Friendly Url Rules Configuration as an example it would become something like this

    Code (Text):
    location / {
        index index.php index.html index.htm;
        try_files $uri $uri/ /index.php?$uri&$args;
        include /usr/local/nginx/conf/php.conf;
    }
    
    location /admin.php {
        auth_basic "Private";
        auth_basic_user_file /usr/local/nginx/conf/htpasswd_admin_php;
           include /usr/local/nginx/conf/php.conf;
           allow 127.0.0.1;
           allow YOURIPADDRESS;
           deny all;
    }
    
    location /install/data/ {
        internal;
        include /usr/local/nginx/conf/php.conf;
    }
    
    location /install/templates/ {
        internal;
        include /usr/local/nginx/conf/php.conf;
    }
    
    location /internal_data/ {
        internal;
        include /usr/local/nginx/conf/php.conf;
    }
    
    location /library/ {
        internal;
        include /usr/local/nginx/conf/php.conf;
    } 
    
    # xenforo 2 uncomment / remove hash from next 3 lines
    #location /src/ {
    #    internal;
    #    include /usr/local/nginx/conf/php.conf;
    #}
    
     
  5. upgrade81

    upgrade81 Premium Member Premium Member

    178
    9
    18
    Sep 5, 2016
    Italy
    Ratings:
    +13
    Local Time:
    4:00 PM
    1.13.8
    10
    Yes, I used that one. Ok thanks for the clarification.

    I recently migrated xen foro on a new installation with centmin.
    I receive many of these warnings in the server log, which I did not receive in the previous configuration you know by chance what they are due to, I do not find much online.

    be clear that members receive emails without problems

    grabilla.g89416.png
     
  6. eva2000

    eva2000 Administrator Staff Member

    37,235
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    1:00 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    can't see the full error
     
  7. upgrade81

    upgrade81 Premium Member Premium Member

    178
    9
    18
    Sep 5, 2016
    Italy
    Ratings:
    +13
    Local Time:
    4:00 PM
    1.13.8
    10
    here another

    Code:
    Zend_Mail_Protocol_Exception: Email to [email protected] failed (after retry): No route to host - library/Zend/Mail/Protocol/Abstract.php:277
    Generated By: Unknown Account, Yesterday at 23:53
    Stack Trace
    #0 /home/nginx/domains/forum.xxxxx.it/public/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('tcp://smtp.send...')
    #1 /home/nginx/domains/forum.xxxxx.it/public/library/Zend/Mail/Transport/Smtp.php(216): Zend_Mail_Protocol_Smtp->connect()
    #2 /home/nginx/domains/forum.xxxx.it/public/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
    #3 /home/nginx/domains/forum.xxxxx.it/public/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
    #4 /home/nginx/domains/forum.xxxxx.it/public/library/XenForo/Model/MailQueue.php(91): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
    #5 /home/nginx/domains/forum.xxxx.it/public/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.9749271869659)
    #6 /home/nginx/domains/forum.xxxxx.it/public/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_MailQueue->execute(Array, Array, 7.9749271869659, '')
    #7 /home/nginx/domains/forum.xxxxx.it/public/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9749271869659, '', false)
    #8 /home/nginx/domains/forum.xxxxx.it/public/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 8, '', false)
    #9 /home/nginx/domains/forum.xxxxx.it/public/deferred.php(23): XenForo_Model_Deferred->run(false)
    #10 {main}
    Request State
    array(3) {
      ["url"] => string(38) "https://forum.xxxxx.it/deferred.php"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(3) {
        ["_xfRequestUri"] => string(47) "/threads/scelta-turbina-maggiorata.64947/page-2"
        ["_xfNoRedirect"] => string(1) "1"
        ["_xfResponseType"] => string(4) "json"
      }
    }
     
  8. eva2000

    eva2000 Administrator Staff Member

    37,235
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    1:00 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Using smtp sendgrid 3rd party which port you using ? it could be blocked in csf firewall if not using default known ports like 25,465,587 as CSF Firewall config file /etc/csf/csf.conf whitelists those in TCP_OUT and TCP6_OUT comma separated list of ports. Some 3rd party smtp use non-standard ports like 2525 which wouldn't be listed in CSF Firewall's TCP_OUT/TCP6_OUT outbound whitelisted ports (maybe they should be ?). I use Amazon SES with smtp setup for TLS port 587 in Xenforo email settings.

    though you wouldn't be able to send email at all if that was the case

    Might want to ask on xenforo support forums too.
     
  9. upgrade81

    upgrade81 Premium Member Premium Member

    178
    9
    18
    Sep 5, 2016
    Italy
    Ratings:
    +13
    Local Time:
    4:00 PM
    1.13.8
    10
    Hello and thank you for your answer

    I have always used the TLS 587 standard.
     
  10. upgrade81

    upgrade81 Premium Member Premium Member

    178
    9
    18
    Sep 5, 2016
    Italy
    Ratings:
    +13
    Local Time:
    4:00 PM
    1.13.8
    10
    hahaha I went to see that thread and the last answer is October 2016!

    My xenforo is exploding.
     
  11. eva2000

    eva2000 Administrator Staff Member

    37,235
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    1:00 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    you can check smtp connect using openssl i.e. if sendgrid
    Code (Text):
    echo | openssl s_client -connect smtp.sendgrid.net:587 -starttls smtp
    

    would give you something like
    Code (Text):
    echo | openssl s_client -connect smtp.sendgrid.net:587 -starttls smtp
    
    CONNECTED(00000003)
    depth=3 C = US, O = "The Go Daddy Group, Inc.", OU = Go Daddy Class 2 Certification Authority
    verify return:1
    depth=2 C = US, ST = Arizona, L = Scottsdale, O = "GoDaddy.com, Inc.", CN = Go Daddy Root Certificate Authority - G2
    verify return:1
    depth=1 C = US, ST = Arizona, L = Scottsdale, O = "GoDaddy.com, Inc.", OU = http://certs.godaddy.com/repository/, CN = Go Daddy Secure Certificate Authority - G2
    verify return:1
    depth=0 OU = Domain Control Validated, CN = *.smtp.sendgrid.net
    verify return:1
    ---
    Certificate chain
     0 s:/OU=Domain Control Validated/CN=*.smtp.sendgrid.net
       i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
     1 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
       i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2
     2 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2
       i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
    ---
    Server certificate
    -----BEGIN CERTIFICATE-----
    MIIFNTCCBB2gAwIBAgIJAML6pK40276rMA0GCSqGSIb3DQEBCwUAMIG0MQswCQYD
    VQQGEwJVUzEQMA4GA1UECBMHQXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEa
    MBgGA1UEChMRR29EYWRkeS5jb20sIEluYy4xLTArBgNVBAsTJGh0dHA6Ly9jZXJ0
    cy5nb2RhZGR5LmNvbS9yZXBvc2l0b3J5LzEzMDEGA1UEAxMqR28gRGFkZHkgU2Vj
    dXJlIENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTE2MDEyOTE3MjQzOVoX
    DTE5MDMyODE4MDEwNVowQTEhMB8GA1UECxMYRG9tYWluIENvbnRyb2wgVmFsaWRh
    dGVkMRwwGgYDVQQDDBMqLnNtdHAuc2VuZGdyaWQubmV0MIIBIjANBgkqhkiG9w0B
    AQEFAAOCAQ8AMIIBCgKCAQEAxVqKo/QDP4eWyAg1taYp8Fv4IhrjDHwtnjyH6qFl
    Q9npxdTq8b8CtYqvnWWXCP1VrYLakgpX8L9vX9mL52UGWeZBVyG+PqEW5cmdJje3
    AS2n25XX+w7Mi+d8WB5T0sfqDPDGpw+7yDin0ZTtS6mQfTsZcC6KBAmQrgV3mX7U
    w3PVzmK+T+PGf9qEe5f3j11W0F7m+TQbcIvqZi70vYnJs+SnZ9frFXL8o5Kl6VoD
    ja/sb1TJj9OExv7GAXeO+uqvN+KW1lKRqdPzoCTlK4OKKzhr+iSxYI3bRmbzYlH2
    dO/BlUmRaMxEGdTg15lpTX5nA+C9OcDUnhmJxIhmHsSkowIDAQABo4IBujCCAbYw
    DAYDVR0TAQH/BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYD
    VR0PAQH/BAQDAgWgMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly9jcmwuZ29kYWRk
    eS5jb20vZ2RpZzJzMS0xODYuY3JsMFMGA1UdIARMMEowSAYLYIZIAYb9bQEHFwEw
    OTA3BggrBgEFBQcCARYraHR0cDovL2NlcnRpZmljYXRlcy5nb2RhZGR5LmNvbS9y
    ZXBvc2l0b3J5LzB2BggrBgEFBQcBAQRqMGgwJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    Y3NwLmdvZGFkZHkuY29tLzBABggrBgEFBQcwAoY0aHR0cDovL2NlcnRpZmljYXRl
    cy5nb2RhZGR5LmNvbS9yZXBvc2l0b3J5L2dkaWcyLmNydDAfBgNVHSMEGDAWgBRA
    wr0njsw0gzCiM9f7bLPwtCyAzjAxBgNVHREEKjAoghMqLnNtdHAuc2VuZGdyaWQu
    bmV0ghFzbXRwLnNlbmRncmlkLm5ldDAdBgNVHQ4EFgQUzSHY0FB97r1Kv7jq2meq
    aXAV2B8wDQYJKoZIhvcNAQELBQADggEBAJ408O/1Xw7J8i9XYTdc7MU066aPCgGQ
    L6XX+OokGOg3yGEJSsiyEyBdEntxnyMozhv+qHHX13TVbkHZRldiqkbxPBA8G4Aj
    gU43QDDNdCWOHOMWpG04Hs8dQwbtd47fH9TdJLXYuoyv+r+0WV/NzoCINhBUE2Xd
    LzEotVBaDzOJsEGu5vRdEQ0+1NVRH937LLPN2PalRHaVYVJ0xbPf+etRdsHUNbWE
    c3o7ZqwFnffnq/I8h5DQVNk+ayq3OjHvdtsWtPdRkaFZKkc9+FIYHXjF7kJZmgom
    NChq8u/zWqYOTIlaIAW/fJDuvJ3F8FHi2lvlIUtXiQmfkpJ0HdbnoPg=
    -----END CERTIFICATE-----
    subject=/OU=Domain Control Validated/CN=*.smtp.sendgrid.net
    issuer=/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
    ---
    No client certificate CA names sent
    ---
    SSL handshake has read 4267 bytes and written 642 bytes
    ---
    New, TLSv1/SSLv3, Cipher is AES128-GCM-SHA256
    Server public key is 2048 bit
    Secure Renegotiation IS supported
    Compression: NONE
    Expansion: NONE
    No ALPN negotiated
    SSL-Session:
        Protocol  : TLSv1.2
        Cipher    : AES128-GCM-SHA256
        Session-ID: 80B07B87A1D0E4DB8F9A222BF5F79F25E62240C918F89CF1D190899DF758B510
        Session-ID-ctx: 
        Master-Key: C54C1DE10885B46BB26529FCD58B7D34FE6B8A6BEADB178499F27DCA5DB864F4530FC7DCD316F74ABF23D5117CB5DDA5
        Key-Arg   : None
        Krb5 Principal: None
        PSK identity: None
        PSK identity hint: None
        TLS session ticket lifetime hint: 300 (seconds)
        TLS session ticket:
        0000 - 8e d5 02 a7 5a 63 ba 23-ae 13 e8 da e2 3e 44 9a   ....Zc.#.....>D.
        0010 - 50 62 85 2b c1 fc c3 ec-e6 77 fb be d0 d2 d8 e4   Pb.+.....w......
        0020 - d6 70 58 13 be 4a 55 ea-02 f9 31 78 9e 10 0d 51   .pX..JU...1x...Q
        0030 - 3c 32 4c c3 f2 cc b8 bc-b3 da 49 d4 9f 55 0d d6   <2L.......I..U..
        0040 - df a1 c4 1d f1 d9 cd ed-13 c0 f9 6e 44 ab 82 6c   ...........nD..l
        0050 - b9 50 92 10 c4 5d 4d 9b-25 db a8 2c 0a c7 67 97   .P...]M.%..,..g.
        0060 - 23 e7 b2 8b 88 c5 c5 a1-a2 c0 4a 2e c1 0f 15 3c   #.........J....<
        0070 - 87 71 ec 77 5e 76 9e f0-99 c6 1a 75 15 da 36 eb   .q.w^v.....u..6.
        0080 - 5a 11 2b f1 46 9e 84 99-29 c6 76 9a 4c f9 1f 67   Z.+.F...).v.L..g
        0090 - cb d3 d6 1e 2d e9 b0 61-a9 f0 c5 81 2e 41 5c c5   ....-..a.....A\.
    
        Start Time: 1522551381
        Timeout   : 300 (sec)
        Verify return code: 0 (ok)
    ---
    250 AUTH=PLAIN LOGIN
    DONE
    
     
  12. upgrade81

    upgrade81 Premium Member Premium Member

    178
    9
    18
    Sep 5, 2016
    Italy
    Ratings:
    +13
    Local Time:
    4:00 PM
    1.13.8
    10
    I tried no problem with the ssl / tls connection
    Excuse me but using this addon, Redis works in full page cache as with Wordpress?
     
  13. eva2000

    eva2000 Administrator Staff Member

    37,235
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    1:00 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    which addon ? xenforo redis cache addon works with xenforo only and is different from centmin.sh menu option 22 selected redis nginx level caching of wordpress. Both use redis server but have their own caching addons for their specific web app/scripts if you use separate php.conf and php-rediscache.conf include files as instructed above
     
  14. upgrade81

    upgrade81 Premium Member Premium Member

    178
    9
    18
    Sep 5, 2016
    Italy
    Ratings:
    +13
    Local Time:
    4:00 PM
    1.13.8
    10
    I would like to understand if it is right to compare it to using less queries to the DB or just as LRU cache as REDIS is used with the option 22 on WP.

    I use this:
    Zend Redis Cache
     
  15. eva2000

    eva2000 Administrator Staff Member

    37,235
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    1:00 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    All frontend and backend caching generally would result in less direct hits to mysql database server if caching is done right and has a high cache hit ratio. That's what caching is meant to do. Now depending on if it's frontend or backend caching, it may also offload direct traffic to other web stack layers like nginx or php-fpm. For example Varnish cache would offload from nginx and php-fpm. Nginx proxy_cache would help for nginx hits, Nginx php-fpm fastcgi_cache would offload for php-fpm.
     
    • Like Like x 1
..