Posted February 23, 20232 yr 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: NGINX Rewrite Rules for Azure App Service Linux PHP 8.x #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/start.sh (feel free to rename it) #!/bin/bash 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: curl -I Microsoft Azure App Service - Welcome [-i, --include Include protocol response headers in the output] Continue reading...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.