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

Beta Branch update virtual.conf main hostname add reuseport from nginx 1.9.x

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jun 26, 2015.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    update virtual.conf main hostname add reuseport from nginx 1.9.x
    also update nginx and TCP settings and system limits


    Continue reading...

    123.08beta03 branch

    * 123.08beta03 branch is the merging of the 3 branches - .08 beta 02 + 123.08lua + 123.08livestats so the new beta has both Nginx Lua + LuaJIT support + new Nginx vhost traffic statistics
     
  2. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    And deferred ? :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you can add it yourself - left to ones own decision :)
     
  4. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    I always use it, I don't see the harm of using it :).
     
  5. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    Please do not auto add reuseport when using menu 2 specially if current/old config has already enable it on port 443, it will cause an nginx error and will not issue properly Letsencrypt Cert.

    Thanks!
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod centmin.sh menu option 2 will only auto add reuseport in listen directive after it checks no other nginx vhost has reuseport already listed on each ip/port pair for ports 80 and 443. Where was your old config created on same server or is this a copied over config not in the usual expected config files that Centmin Mod creates ?

    Where was the duplicate reuseport added and how did it look ?

    What is output for this command on the server
    Code (Text):
    grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl' | grep ' http2' | grep reuseport | awk -F ':  ' '{print $2}' | grep -o reuseport

    and
    Code (Text):
    grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl' | grep ' http2' | grep reuseport | awk -F ':  ' '{print $2}' 
     
  7. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    Not copied over but I created it manually.
    Filename though differs a bit but just missing .ssl. on the filename.

    Added on new created vhost config on port 443.
    Does preventing Nginx to start because of duplicate error.
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    shouldn't matter if the above 2 commands I want your output from return reuseport as that tells centmin.sh menu option 2, reuseport already in use so don't add it to nginx ssl vhost

    what does listen directive look like for manually created vhost ?
     
  9. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    Both nothing.

    Code:
    ...
    server {
        listen 443 ssl http2 reuseport fastopen=256;
        server_name ...
     
  10. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    did you add your manually created vhost after centmin.sh menu option 2 created one ? if so, then that would explain it as detection can't detect manually created vhosts after centmin.sh menu option 2

    is this without your manually created vhost ? cause it should return something if your manually created vhost with reuseport exists for those commands
     
  11. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    No, it's there before I run menu 2.

    With my manually created vhost.
     
  12. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    strange what's output for these commands
    Code (Text):
    grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl' | grep ' http2' | grep reuseport
    

    Code (Text):
    grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl' | grep ' http2'
    

    Code (Text):
    grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl'
    

    Code (Text):
    grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443
    
     
  13. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    Code:
    [18:05][root@server ~]# grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl' | grep ' http2' | grep reuseport
    /usr/local/nginx/conf/conf.d/domain1.com.ssl.conf:18:    listen 443 ssl http2 reuseport fastopen=256;
    
    [18:05][root@server ~]# grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl' | grep ' http2'
    /usr/local/nginx/conf/conf.d/domain1.com.ssl.conf:9:    listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain1.com.ssl.conf:18:    listen 443 ssl http2 reuseport fastopen=256;
    /usr/local/nginx/conf/conf.d/domain2.com.ssl.conf:9:    listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain2.com.ssl.conf:18:    listen 443 ssl http2;
    
    [18:05][root@server ~]# grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl'
    /usr/local/nginx/conf/conf.d/domain1.com.ssl.conf:9:    listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain1.com.ssl.conf:18:    listen 443 ssl http2 reuseport fastopen=256;
    /usr/local/nginx/conf/conf.d/domain2.com.ssl.conf:9:    listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain2.com.ssl.conf:18:    listen 443 ssl http2;
    
    [18:05][root@server ~]# grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443
    /usr/local/nginx/conf/conf.d/domain1.com.ssl.conf:9:    listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain1.com.ssl.conf:18:    listen 443 ssl http2 reuseport fastopen=256;
    /usr/local/nginx/conf/conf.d/domain2.com.ssl.conf:9:    listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/domain2.com.ssl.conf:18:    listen 443 ssl http2;
    
    [18:05][root@server ~]#
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah it's spacing between semi-colon in grep output and listen for awk filter but on my test install your listen also returns a value for reuseport

    top is your line and bottom is what centmin mod expects
    Code (Text):
    :    listen 443 ssl http2
    :  listen 443 ssl http2
    

    will have to revise the filter
     
  15. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    does this revised filter return a value ?
    Code (Text):
    grep -rn listen /usr/local/nginx/conf/conf.d/ | grep -v '#' | grep 443 | grep ' ssl' | grep ' http2' | grep -o reuseport 
     
  16. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    Yes :)
     
  17. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    great will update 123.09beta01 with the revise fixed detection :)
     
  18. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    I encounter the same error again now.
     
  19. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    6:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  20. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    4:21 PM
    Mainline
    10.2
    It return reuseport properly though.

    This time I put reuseport at the very last beside the semi colon.