• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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