Remove Nginx Server Header – Linux App Service (PHP 8.x blessed image)

Posted by

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

We can follow the below steps to remove the Server header from HTTP response for PHP 8.x apps on Linux App Service (which uses Nginx server) - 
We will be following the steps described here to change the configurations of Nginx:
#create a copy of the default configurations
cp /etc/nginx/sites-available/default /home/site/default#add the following properties in the copied file /home/site/default
server_tokens off;
more_clear_headers Server;
#create a startup script /home/site/ (feel free to rename it)
cp /home/site/default /etc/nginx/sites-available/default
service nginx reload


#Add a startup command on the WebApp and wait for it to restart.
#We can using the cURL command:
[-i, --include Include protocol response headers in the output]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.