How to remove 'X-Powered-By'?

Hi! Can anyone help me with this?
Any suggestions @mrrobot47


What I finally did:

  1. Copied nginx.conf from the docker container to a local directory for editing
    docker cp services_global-nginx-proxy_1:/etc/nginx/nginx.conf /<your-dir>/nginx.conf
  2. Removed the line include /version.conf; by commenting and saved the file
  3. Copied the modified nginx.conf back to the docker container
    docker cp /<your-dir>/nginx.conf services_global-nginx-proxy_1:/etc/nginx/nginx.conf
  4. Restarted global service nginx-proxy
    ee service restart nginx-proxy
  5. Restarted site for good measure
    ee site restart <sitename>

You would be wise to leave it in there for debugging.

OK I understand but how do I do it if I wanted it to be hidden. Could you help?

Remove the following line in nginx. conf file and restart nginx.

add_header X-Powered-By “EasyEngine”;

That method doesn’t for v4

Found that X-Powered-By comes from version.conf. Can this be excluded?
edit: I modified the /var/lib/docker/overlay2/…/merged/etc/nginx/nginx.conf file and was able to hide X-Powered-By. But it’ll probably get overwritten after a update. Is there a better approach?

you can run

 grep -r  "X-Powered-By" /var/lib/docker/overlay2/* | grep version.conf

and edit file version.conf done

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.