How do I add a module to NGINX in Laravel Forge?
Linode
Linode Staff
I need to install one or the other of nginx-module-security-headers or nginx-module-headers-more to remove the "server" HTTP header.
1 Reply
hphillips
Linode Staff
Removing the Server Header Banner
I believe you can do this without modules. You will want to first backup your /etc/nginx/nginx.config file:
sudo cp /etc/nginx/nginx.config etc/nginx/nginx.config.bak
Edit /etc/nginx/nginx.config
, and add the following line at the top of the config:
server_tokens off;
Restart your nginx server.
Understanding NGINX Modules in Forge
Unlike Apache, NGINX Modules need to be compiled into NGINX, so you would need to follow the instructions for the particular modules. I was unable to locate the modules you mention, but I did find this link that explains the complications of custom compliling NGINX in your environment.