Question
How to remove the header X-Powered-By for all websites hosted in Plesk for Linux?
# curl -I https://example.com
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 01 Jun 2017 00:00:00 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PleskLin
Answer
-
Install the extension Panel.ini editor to manage Plesk settings.
-
Go to Extensions > My Extensions > Panel.ini Editor (Open button) > switch to the Editor tab.
-
Add the following lines at the end of the file:
[webserver]
xPoweredByHeader = off -
Click Save.
-
Go to Tools & Settings > Diagnose & Repair and click repair for Web & FTP Servers to rebuild web-server configuration.
Command-line solution
-
Connect to the Plesk server via SSH (Linux) / RDP (Windows Server).
-
Open
panel.ini
file with the command (on Windows Server, use a command prompt):# plesk conf panel.ini
-
Add the lines below at the bottom of the file:
[webserver]
xPoweredByHeader = off -
Save changes and close the file.
-
Recreate web-server configuration for domains:
# plesk repair web -domains-only