Created
October 20, 2021 16:52
-
-
Save SeyedMostafaAhmadi/9b539ceb9727978afc9ee95eb7aca4a1 to your computer and use it in GitHub Desktop.
Hide View Server Header Information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We can stop outputting the version of nginx and os by adding below command in nginx config in /etc/ngingx/nginx.conf to a http, server, or location context. | |
server_tokens off; | |
# Or if we want to remove the Server header completely, We need to compile Nginx with the Headers More module in, as the header is hard coded in the Nginx source, and this module allows changing any http headers. | |
more_clear_headers Server; | |
# for use top module we should install "apt install nginx-extras" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment