Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx Beta Branch Invitation To Test Native Nginx IPv6 Vhost Config Support in 130.00beta01

Discussion in 'Beta release code' started by eva2000, Nov 14, 2022.

  1. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    4:50 AM
    Nginx 1.25.x
    MariaDB 10.x
    FYI, from November 29, 2022, committed the patched code to 130.00beta01 branch so cmupdate is enough to get the code updated and then you need to enable it with first posts listed 2 persistent config file variables for any testing. Feedback for this can continue in this thread :)

     
  2. atomi

    atomi Member

    36
    10
    8
    Jul 14, 2018
    Ratings:
    +23
    Local Time:
    9:50 PM
    1.27.x
    10
    Atleast 'nv' is not adding needed lines in non-HTTPS nginx vhost with the latest 130.00beta01.b500

    Added domain
    Code:
    # nv -d example.com -s y
    out put from 'head -20 /usr/local/nginx/conf/conf.d/example.com.conf'
    Code:
    # Centmin Mod Getting Started Guide
    # must read https://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;
    #            listen   [::]:80;
    #            server_name example.com;
    #            return 301 $scheme://www.example.com$request_uri;
    #       }
    
    server {
      listen   80;
      server_name example.com www.example.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    
    my current custom_config.inc can be found here and for this time I added following lines
    Code:
    FORCE_IPVFOUR='n'
    NGINX_IPV='y'
    VPS_IPSIX_CHECK_DISABLE='n'
    VPS_IPSIX_CHECK_DISABLE_DEBUG='y
    I noticed this a while ago when I had one domain in Cloudflare and DNS was pointing into IPv6 address. If you use SSL/TLS encryption in flexible mode it doesnt work since it tries to connect non-https port
     
  3. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    4:50 AM
    Nginx 1.25.x
    MariaDB 10.x
    every centmin.sh menu and nv command run automatically saves a log to /root/centminlogs for troubleshooting and record keeping. If you share a santized version of that log file via Gist Github, Pastebin etc i.e. root/centminlogs/centminmod*_nginx_addvhost_nv.log it would help with troubleshooting

    i.e. nv command output for this Nginx nv vhost creation run at /root/centminlogs/centminmod_031123-235247_nginx_addvhost_nv.log which you can reference back to for any details you wanted from nv command output i.e. credentials, log and file paths etc.
    Code (Text):
    -------------------------------------------------------------
    vhost for domain.com setup successfully
    domain.com setup info log saved at:
    /root/centminlogs/centminmod_031123-235247_nginx_addvhost_nv.log
    -------------------------------------------------------------


    If you list the automated log files in reverse date ascending order and filter grep on date timestamp, you can see the logs created for just this nv command line run. The Nginx vhost removal commands are also logged to log file at /root/centminlogs/centminmod_031123-235247_nginx_addvhost_nv-remove-cmds-domain.com.log
    Code (Text):
    ls -lAls -lAhrt /root/centminlogs | grep '031123-235247'
    4.0K -rw-r--r-- 1 root root  264 Nov  3 23:53 letsdebug-domain.com-031123-235247.log
    4.0K -rw-r--r-- 1 root root 1.4K Nov  3 23:53 centminmod_031123-235247_nginx_addvhost_nv-remove-cmds-domain.com.log
     36K -rw-r--r-- 1 root root  33K Nov  3 23:53 centminmod_031123-235247_nginx_addvhost_nv.log
     
  4. atomi

    atomi Member

    36
    10
    8
    Jul 14, 2018
    Ratings:
    +23
    Local Time:
    9:50 PM
    1.27.x
    10
    Here is the content from /root/centminlogs/centminmod_271223-125114_nginx_addvhost_nv.log in pastebin
     
  5. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    4:50 AM
    Nginx 1.25.x
    MariaDB 10.x
    @atomi Ok I found the bug in nv command when enabling optional VPS_IPSIX_CHECK_DISABLE='n' and VPS_IPSIX_CHECK_DISABLE_DEBUG='y' and committed fix to 130.00beta01

    but can you verify if in persistent config file /etc/centminmod/custom_config.inc if you set this variable with missing closing 'y instead of ='y'
    Code (Text):
    VPS_IPSIX_CHECK_DISABLE_DEBUG='y
    

    If any of your variables in persistent config file have missing closing values, it can impact the rest of variables being read by Centmin Mod
     
  6. atomi

    atomi Member

    36
    10
    8
    Jul 14, 2018
    Ratings:
    +23
    Local Time:
    9:50 PM
    1.27.x
    10
    Yes that missing closing was copypaste error but you nailed that bug
    cmupdate && nv -d example2.com -s y
    and example2.com.conf has that ipv6 listener which was missing earlier
     
    Last edited: Dec 28, 2023