Get the most out of your Centmin Mod LEMP stack
Become a Member

Beta Branch update nginx vhost templates

Discussion in 'Centmin Mod Github Commits' started by eva2000, Feb 2, 2016.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    55,180
    12,250
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,828
    Local Time:
    6:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  2. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    4:36 AM
    Is there somewhere which lists what we should add to the files already created in an already existing install?
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,180
    12,250
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,828
    Local Time:
    6:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    if you read the actual commit linked above update nginx vhost templates · centminmod/centminmod@e7a2c90 · GitHub you can see

    there's unified or split view top right buttons to see diff of before and after changes which marks the exact line within respective files

    for http vhost it's between the pagespeed 3rd include line and limit_conn lines
    Code:
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      #add_header X-Frame-Options SAMEORIGIN;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always;
    
      # limit_conn limit_per_ip 16;
    for https vhost it's replacing
    Code:
      #add_header  X-Content-Type-Options "nosniff";
      #add_header X-Frame-Options DENY;
    with
    Code:
      #add_header X-Frame-Options SAMEORIGIN;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always;
    Also updated the official vhost generator with same template additions for these additional security headers at centminmod.com/vhost.php.
     
    Last edited: Feb 3, 2016