APACHE WEB SERVER ON UBUNTU SERVER

The Apache HTTP Server, colloquially called Apache, is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. It allows website owners to serve content on the web. Wikipedia
[email protected][~]# sudo apt-get -y install apache2
Harden Your Apache Web
Hide Apache Version and Operating System
[email protected][~]# nano /etc/apache2/conf-enabled/security.conf
Add the two lines in apache config file
ServerSignature Off
ServerTokens Prod
Disable Directory Listing and FollowSymLinks
[email protected][~]# nano /etc/apache2/apache2.conf
Edit the config file /etc/apache2/apache2.conf by putting “-” before each tag directive in the line Options Indexes FollowSymLinks to become Options -Indexes -FollowSymLinks
Disable TRACE HTTP Request
[email protected][~]# nano /etc/apache2/apache2.conf
Adding the line TraceEnable off in the config file /etc/apache2/apache2.conf
[email protected][~]# sudo systemctl restart apache2