Welcome to Centmin Mod Community
Register Now

Change nginx web server banner

Discussion in 'Centmin Mod Insights' started by Josephm, Sep 15, 2014.

Tags:
  1. Josephm

    Josephm Active Member

    132
    44
    28
    Aug 26, 2014
    Ratings:
    +48
    Local Time:
    2:27 AM
    1.9.5
    10.0.21
    Hi eva2000, I ran Acunetix tool to scan security for my site, it shown my web server banner "nginx centminmod". Not sure if/how I could change to another text such as apache or something else?
    Thanks.

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,671
    Local Time:
    5:27 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    edit line 7 of centmin.sh to what you want and then run centmin.sh menu option 4 to recompile Nginx server or edit it before initial install run for centmin.sh

    Code:
    CUSTOMSERVERSTRING='nginx centminmod'
     
  3. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    10:27 PM
    1.9.10
    10.1.11
    How can we set that variable permanently? Because i think it may change on some centmin updates.
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,671
    Local Time:
    5:27 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod 123.08stable and higher sets Nginx server banner in /usr/local/nginx/conf/nginx.conf (can get to it via shortcut command = nginxconf which invokes nano text editor on /usr/local/nginx/conf/nginx.conf)

    Code (Text):
    more_set_headers "Server: nginx centminmod";
    more_set_headers "X-Powered-By: centminmod";
     
  5. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    10:27 PM
    1.9.10
    10.1.11
    I know that but you will get still "nginx centminmod" even removed these 2 lines from nginx.conf too because of another set in anywhere i think.
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,671
    Local Time:
    5:27 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    don't remove those lines, just change the value i.e. set it to nginx
     
  7. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    10:27 PM
    1.9.10
    10.1.11
    Ah okay, i just changed to "nginx" only. Thanks