Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx web server value change

Discussion in 'Install & Upgrades or Pre-Install Questions' started by hitman, Jan 24, 2016.

  1. hitman

    hitman Member

    126
    11
    18
    Jul 18, 2014
    Ratings:
    +15
    Local Time:
    10:58 AM
    i am sorry if it is already posted but i could not find it
    i want to change the value of the web server which is by default "nginx centmin mod"
    how can i do that?

     
  2. ModeltogTossen

    ModeltogTossen I wish I could??

    313
    97
    28
    Dec 20, 2015
    Denmark
    Ratings:
    +143
    Local Time:
    9:58 AM
    1.9.12
    10.0.23
    I'm not sure I understand what you wish.. Lets say you have giving your server the hostname centm.domain.net - is it that content you wish to change?

    If so - then read the page, it tells you what to change, like this:

     
  3. eva2000

    eva2000 Administrator Staff Member

    54,893
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I believe @hitman wants to change the Server: and X-Powered-By: headers
    Code:
    curl -I centminmod.com
    HTTP/1.1 200 OK
    Content-Type: text/html; charset=utf-8
    Connection: keep-alive
    Vary: Accept-Encoding
    Server: nginx centminmod
    X-Powered-By: centminmod
    X-Frame-Options: SAMEORIGIN
    X-Xss-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    X-Geo: US
    Date: Sun, 24 Jan 2016 12:24:40 GMT
    X-Page-Speed: centminmod.com PageSpeed
    Cache-Control: max-age=0, no-cache
    To change Centmin Mod Server header edit /usr/local/nginx/conf/nginx.conf (cmd shortcut = nginxconf to launch nano text editor).
    Code:
    more_set_headers "Server: nginx centminmod";
    more_set_headers "X-Powered-By: centminmod";
    Then restart nginx server
    Code:
    service nginx restart
    or via cmd shortcut
    Code:
    ngxrestart
     
  4. ModeltogTossen

    ModeltogTossen I wish I could??

    313
    97
    28
    Dec 20, 2015
    Denmark
    Ratings:
    +143
    Local Time:
    9:58 AM
    1.9.12
    10.0.23
    Yes of course - and sorry to @hitman - did not think about of that..
     
  5. hitman

    hitman Member

    126
    11
    18
    Jul 18, 2014
    Ratings:
    +15
    Local Time:
    10:58 AM
    thank you for your replies
    yes george that is what i meant

    thank you again