Welcome to Centmin Mod Community
Become a Member

Nginx Domains nginx vhost config

Discussion in 'Install & Upgrades or Pre-Install Questions' started by noly, Sep 8, 2017.

  1. noly

    noly Member

    53
    10
    8
    Jul 24, 2017
    Frankfurt/Germany
    Ratings:
    +18
    Local Time:
    6:21 AM
    1.13.3
    10
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.5
    • PHP Version Installed: 7.0.20
    • MariaDB MySQL Version Installed: 10.1.25
    • When was last time updated Centmin Mod code base ? : just did
    • Persistent Config:
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGINX_PAGESPEED='y'

    Aloha,

    i got three questions regarding the generated vhost..

    1.
    The vhost template lists...

    Code:
    #add_header X-Content-Type-Options "nosniff" always;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always; 

    ...shouldn't it be.. ?

    Code:
    #add_header X-Frame-Options SAMEORIGIN;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always;
    2.
    Is it possible to customize the template and don't have to worry that updating centmin will override it?

    3.
    Since i create lots of subdomains and would like to a) keep the .conf clean b) avoid google punishment for duplicate content...

    Is it possible to have centmin recognize that a third-level-domain (subdomain) is entered and then not to add a fourth- i.e. "www._" to the server_name ?
    Right now one gets this...

    Code:
    server_name _subdomain_._domain_.com www._subdomain_._domain_.com;
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,720
    6,711
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,015
    Local Time:
    2:21 PM
    Nginx 1.13.x
    MariaDB 5.5
    just ignore www. added for domains not used as it does nothing unless you also add a DNS entry for it anyway. Right now hard to detect subdomains only as folks including myself can setup dummy domains/subdomains without DNS updates for testing. To detect subdomains vs domains probably need to check the domain's DNS which new accounts might not have setup

    only limited support via newly added static include files for non web root / location additions https://community.centminmod.com/threads/add-vhost_prestaticinc-y-additional-include-files.12156/

    yes it should just found the bug and will update 123.09beta01 :)
     
    • Like Like x 1