Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sidart's avatar
Level 12

Hiding Server Name in a laravel forge server

Hello,

While i am using the laravel forge default nginx configuration, i would like to hide the nginx as a server name if someone uses tools like wappylizer or http header website checkers so noone knows the version and whats the server i am using.

I did try to add server_tokens "off"; after the server name in the configuration, restarted nginx and it will still show the server name.

0 likes
1 reply
D9705996's avatar

with server_tokens: off Nginx will hide the version from the server header in the response and just show Nginx. If you really need to hide the header you can add this to Nginx.conf

more_clear_headers Server;

To Set a different header changd to

more_set_headers 'Server: NotNginx;

Note you may need to install nginx-extras and certain clients use this header to help deal with responses rfc so removing it might not be the best idea.

https://serverfault.com/a/766634/267000

Please or to participate in this conversation.