How to change server name in apache
I want to change the server name in apache. I know it easily as we can make changes to the apache.cnf and httpd.cnf file. But I am tired after making changes to all files. I checked all files and config but only repdirect to another ip didn't work. So how can I change the server name
<VirtualHost *:443>
ServerName xyz.com
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key.nopass
</VirtualHost>
Thanks for any help.
+3
source to share
1 answer
This can be achieved by installing the Apache mod_security module.
After installation, open the Apache configuration file.
$ sudo vi /etc/apache2/apache2.conf #Debian/Ubuntu
$ vi /etc/httpd/conf/httpd.conf #RHEL/CentOS/Fedora
Now change or add these lines below (be sure to change Tech_Web to whatever you want to show customers).
ServerTokens Full
SecServerSignature "Tech_Web"
Finally, restart the web server.
0
source to share