Join the community today
Register Now

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

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    4,739
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    10:55 AM
    Mainline
    10.2
    And deferred ? :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    you can add it yourself - left to ones own decision :)
     
  4. rdan

    rdan Well-Known Member

    4,739
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    10:55 AM
    Mainline
    10.2
    I always use it, I don't see the harm of using it :).
     
    • Informative Informative x 1
  5. rdan

    rdan Well-Known Member

    4,739
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    10:55 AM
    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

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    4,739
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    10:55 AM
    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

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    4,739
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    10:55 AM
    Mainline
    10.2
    Both nothing.

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

    eva2000 Administrator Staff Member

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    4,739
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    10:55 AM
    Mainline
    10.2
    No, it's there before I run menu 2.

    With my manually created vhost.
     
  12. eva2000

    eva2000 Administrator Staff Member

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    4,739
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    10:55 AM
    Mainline
    10.2
    Code:
    [18:05][[email protected] ~]# 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][[email protected] ~]# 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][[email protected] ~]# 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][[email protected] ~]# 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][[email protected] ~]#
     
  14. eva2000

    eva2000 Administrator Staff Member

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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
     
    • Like Like x 1
  15. eva2000

    eva2000 Administrator Staff Member

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    4,739
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    10:55 AM
    Mainline
    10.2
    Yes :)
     
    • Informative Informative x 1
  17. eva2000

    eva2000 Administrator Staff Member

    42,346
    9,561
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,733
    Local Time:
    12:55 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    great will update 123.09beta01 with the revise fixed detection :)
     
    • Like Like x 1