• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Remove X-Powered-By

neo2012

Basic Pleskian
Hello,
I use an Ubuntu 14.04.3 LTS Server with Plesk 12.5.30 Update #18.
Is it possible to completly remove the X-Powered-By in the header?
In the Plesk Panel I added for additional Apache HTTP commands: "Header unset X-Powered-By".
This removed the "PleskLin" in the X-Powered-By.
So the resulting header is: X-Powered-By PHP/5.5.9-1ubuntu4.14
Can I even remove the rest?
And how can I change the Cache-Control in the header?
The command: Header set Cache-Control "max-age=86400, public, must-revalidate"
only adds this value and does not remove the default.

Thank you for your help!
 
Hi neo2012,
the X-Powered-By header is removable via the server.php (line 59) template located at..
Code:
/opt/psa/admin/conf/templates/default/server.php


copy this file to...
Code:
/opt/psa/admin/conf/templates/custom/server.php


If you don't have the custom folder, just create it, once you have copied the file into the custom folder you can edit it.
Then you will have to regenerate the server conf files with...
Code:
/opt/psa/admin/bin/httpdmng --reconfigure-all


Now check your headers.
Hope that helps
Kind regards

Lloyd
 
Thank you for your quick answer. My answer is a little late, but that has reasons.
Your answer helped for removing "Plesklin" but "X-Powered-ByPHP/5.5.9-1ubuntu4.14" still appears in the Header. Is there a way to remove that?
Thanks again!
 
Thanks. I changed it in the files you wrote, but after apache restart it was still showing the version. Then I changed it in the PHP config in Plesk Panel and added:
expose_php = off
Then it worked.
EDIT: In static nginx files the header still shows "X-Powered-By PlesLin", where can I remove this? EDIT2: I changed like in an older threat the template in "/opt/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php" and removed there the "add_header X-Powered-By PleskLin" line. That solved this.
 
Last edited:
Back
Top